kickflow 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +18 -0
- data/LICENSE.txt +202 -0
- data/README.md +303 -0
- data/Rakefile +48 -0
- data/Rakefile~ +48 -0
- data/bin/console +11 -0
- data/bin/setup +8 -0
- data/bin/setup-Nix +2 -0
- data/docs/Attachment.md +22 -0
- data/docs/Category.md +24 -0
- data/docs/ClimberCloudSetting.md +24 -0
- data/docs/ClimberCloudSettingMappingsInner.md +20 -0
- data/docs/Comment.md +32 -0
- data/docs/DefaultApi.md +6318 -0
- data/docs/DeleteTeamsTeamIdMembersRequest.md +18 -0
- data/docs/ExternalApiSetting.md +30 -0
- data/docs/ExternalApiSettingHeadersInner.md +20 -0
- data/docs/ExternalApiSettingMappingsInner.md +24 -0
- data/docs/Folder.md +34 -0
- data/docs/FolderDetail.md +38 -0
- data/docs/FormField.md +60 -0
- data/docs/FormFieldDetail.md +68 -0
- data/docs/GeneralMaster.md +30 -0
- data/docs/GeneralMasterField.md +36 -0
- data/docs/GeneralMasterItem.md +34 -0
- data/docs/GeneralMasterItemInputsInner.md +26 -0
- data/docs/GeneralMasterItemInputsInnerValue.md +15 -0
- data/docs/GetFilesSignedId200Response.md +28 -0
- data/docs/GetTicketsStatusParameter.md +49 -0
- data/docs/Grade.md +30 -0
- data/docs/GradeCreateBody.md +22 -0
- data/docs/GradeUpdateBody.md +22 -0
- data/docs/Label.md +28 -0
- data/docs/MemberUser.md +46 -0
- data/docs/OrganizationChart.md +32 -0
- data/docs/OrganizationChartActivationPlan.md +24 -0
- data/docs/OrganizationChartBody.md +18 -0
- data/docs/OrganizationChartDetail.md +32 -0
- data/docs/PatchFoldersFolderIdRequest.md +24 -0
- data/docs/PatchGeneralMastersGeneralMasterIdItemsItemIdRequest.md +28 -0
- data/docs/PatchGeneralMastersGeneralMasterIdItemsItemIdRequestInputsInner.md +20 -0
- data/docs/PatchGeneralMastersGeneralMasterIdItemsItemIdRequestInputsInnerValue.md +49 -0
- data/docs/PatchGeneralMastersGeneralMasterIdRequest.md +24 -0
- data/docs/PatchGeneralMastersGeneralMasterIdRequestFieldsInner.md +30 -0
- data/docs/PatchTeamsTeamIdMembershipsUserIdRequest.md +20 -0
- data/docs/PatchTicketsIdCommentsCommentIdRequest.md +18 -0
- data/docs/PatchTicketsTicketIdRequest.md +30 -0
- data/docs/PatchTicketsTicketIdRequestCloudSignDocument.md +22 -0
- data/docs/PatchTicketsTicketIdRequestInputsInner.md +32 -0
- data/docs/PatchTicketsTicketIdRequestSlipItemsInner.md +18 -0
- data/docs/PatchTicketsTicketIdRequestSlipItemsInnerInputsInner.md +26 -0
- data/docs/PatchUsersUserIdRequest.md +26 -0
- data/docs/PostCategoriesRequest.md +18 -0
- data/docs/PostFiles200Response.md +18 -0
- data/docs/PostFoldersRequest.md +24 -0
- data/docs/PostGeneralMastersGeneralMasterIdItemsRequest.md +28 -0
- data/docs/PostGeneralMastersGeneralMasterIdItemsRequestInputsInner.md +20 -0
- data/docs/PostGeneralMastersGeneralMasterIdItemsRequestInputsInnerValue.md +49 -0
- data/docs/PostGeneralMastersRequest.md +24 -0
- data/docs/PostGeneralMastersRequestFieldsInner.md +30 -0
- data/docs/PostOrganizationChartsOrganizationChartIdActivateRequest.md +18 -0
- data/docs/PostProxyApplicantsRequest.md +26 -0
- data/docs/PostProxyApproversRequest.md +26 -0
- data/docs/PostRolesRoleIdMembershipsRequest.md +18 -0
- data/docs/PostTeamsTeamIdMembersRequest.md +18 -0
- data/docs/PostTeamsTeamIdMembersRequestUsersInner.md +22 -0
- data/docs/PostTicketsIdCommentsRequest.md +20 -0
- data/docs/PostTicketsIdViewersRequest.md +22 -0
- data/docs/PostTicketsIdViewersRequestTeamId.md +15 -0
- data/docs/PostTicketsIdViewersRequestUserId.md +15 -0
- data/docs/PostTicketsRequest.md +32 -0
- data/docs/PostTicketsRequestCloudSignDocument.md +22 -0
- data/docs/PostTicketsRequestInputsInner.md +32 -0
- data/docs/PostTicketsRequestInputsInnerTeamId.md +49 -0
- data/docs/PostTicketsRequestInputsInnerTicketId.md +49 -0
- data/docs/PostTicketsRequestInputsInnerUserId.md +49 -0
- data/docs/PostTicketsRequestSlipItemsInner.md +18 -0
- data/docs/PostTicketsRequestSlipItemsInnerInputsInner.md +26 -0
- data/docs/PostTicketsRequestSlipItemsInnerInputsInnerGeneralMasterItemId.md +49 -0
- data/docs/PostTicketsRequestSlipItemsInnerInputsInnerValue.md +49 -0
- data/docs/PostTicketsTicketIdRejectRequest.md +18 -0
- data/docs/PostUsersRequest.md +28 -0
- data/docs/ProxyApplicant.md +32 -0
- data/docs/ProxyApprover.md +32 -0
- data/docs/Role.md +28 -0
- data/docs/RoleCreateBody.md +20 -0
- data/docs/RoleCreateBodyPermissionListInner.md +26 -0
- data/docs/RoleDetail.md +30 -0
- data/docs/RoleDetailAllOfPermissionList.md +26 -0
- data/docs/RoleUpdateBody.md +20 -0
- data/docs/RoleUpdateBodyPermissionListInner.md +26 -0
- data/docs/Route.md +40 -0
- data/docs/RouteDetail.md +42 -0
- data/docs/RouteStep.md +44 -0
- data/docs/RouteStepCondition.md +24 -0
- data/docs/RouteStepConditionField.md +34 -0
- data/docs/RouteStepTarget.md +24 -0
- data/docs/Section.md +32 -0
- data/docs/SlipField.md +56 -0
- data/docs/SlipFieldDetail.md +60 -0
- data/docs/SlipItem.md +24 -0
- data/docs/SlipItemInput.md +30 -0
- data/docs/SlipItemInputValue.md +15 -0
- data/docs/SubStatus.md +28 -0
- data/docs/Team.md +32 -0
- data/docs/TeamCreateBody.md +24 -0
- data/docs/TeamDetail.md +38 -0
- data/docs/TeamUpdateBody.md +24 -0
- data/docs/Ticket.md +50 -0
- data/docs/TicketAssignee.md +28 -0
- data/docs/TicketDetail.md +68 -0
- data/docs/TicketDetailAllOfCloudSignDocument.md +32 -0
- data/docs/TicketInput.md +32 -0
- data/docs/TicketInputValue.md +15 -0
- data/docs/TicketSection.md +22 -0
- data/docs/TicketStep.md +44 -0
- data/docs/TicketViewer.md +24 -0
- data/docs/TicketWorkflow.md +74 -0
- data/docs/User.md +42 -0
- data/docs/UserDetail.md +42 -0
- data/docs/UserImage.md +18 -0
- data/docs/Workflow.md +66 -0
- data/docs/WorkflowDetail.md +76 -0
- data/docs/WorkflowInTicket.md +74 -0
- data/docs/WorkflowInTicketAllOfCloudSignSetting.md +18 -0
- data/docs/WorkflowRouteCondition.md +30 -0
- data/docs/WorkflowRouteConditionField.md +30 -0
- data/docs/WorkflowTicketViewer.md +24 -0
- data/git_push.sh +57 -0
- data/kickflow.gemspec +34 -0
- data/lib/kickflow/api/_api.rb +6531 -0
- data/lib/kickflow/api_client.rb +431 -0
- data/lib/kickflow/api_error.rb +58 -0
- data/lib/kickflow/configuration.rb +392 -0
- data/lib/kickflow/models/attachment.rb +257 -0
- data/lib/kickflow/models/category.rb +293 -0
- data/lib/kickflow/models/climber_cloud_setting.rb +261 -0
- data/lib/kickflow/models/climber_cloud_setting_mappings_inner.rb +238 -0
- data/lib/kickflow/models/comment.rb +341 -0
- data/lib/kickflow/models/delete_teams_team_id_members_request.rb +252 -0
- data/lib/kickflow/models/external_api_setting.rb +359 -0
- data/lib/kickflow/models/external_api_setting_headers_inner.rb +239 -0
- data/lib/kickflow/models/external_api_setting_mappings_inner.rb +268 -0
- data/lib/kickflow/models/folder.rb +448 -0
- data/lib/kickflow/models/folder_detail.rb +479 -0
- data/lib/kickflow/models/form_field.rb +646 -0
- data/lib/kickflow/models/form_field_detail.rb +693 -0
- data/lib/kickflow/models/general_master.rb +361 -0
- data/lib/kickflow/models/general_master_field.rb +442 -0
- data/lib/kickflow/models/general_master_item.rb +387 -0
- data/lib/kickflow/models/general_master_item_inputs_inner.rb +288 -0
- data/lib/kickflow/models/general_master_item_inputs_inner_value.rb +105 -0
- data/lib/kickflow/models/get_files_signed_id200_response.rb +307 -0
- data/lib/kickflow/models/get_tickets_status_parameter.rb +105 -0
- data/lib/kickflow/models/grade.rb +383 -0
- data/lib/kickflow/models/grade_create_body.rb +316 -0
- data/lib/kickflow/models/grade_update_body.rb +283 -0
- data/lib/kickflow/models/label.rb +343 -0
- data/lib/kickflow/models/member_user.rb +620 -0
- data/lib/kickflow/models/organization_chart.rb +356 -0
- data/lib/kickflow/models/organization_chart_activation_plan.rb +274 -0
- data/lib/kickflow/models/organization_chart_body.rb +223 -0
- data/lib/kickflow/models/organization_chart_detail.rb +363 -0
- data/lib/kickflow/models/patch_folders_folder_id_request.rb +246 -0
- data/lib/kickflow/models/patch_general_masters_general_master_id_items_item_id_request.rb +269 -0
- data/lib/kickflow/models/patch_general_masters_general_master_id_items_item_id_request_inputs_inner.rb +238 -0
- data/lib/kickflow/models/patch_general_masters_general_master_id_items_item_id_request_inputs_inner_value.rb +106 -0
- data/lib/kickflow/models/patch_general_masters_general_master_id_request.rb +247 -0
- data/lib/kickflow/models/patch_general_masters_general_master_id_request_fields_inner.rb +286 -0
- data/lib/kickflow/models/patch_teams_team_id_memberships_user_id_request.rb +260 -0
- data/lib/kickflow/models/patch_tickets_id_comments_comment_id_request.rb +222 -0
- data/lib/kickflow/models/patch_tickets_ticket_id_request.rb +312 -0
- data/lib/kickflow/models/patch_tickets_ticket_id_request_cloud_sign_document.rb +257 -0
- data/lib/kickflow/models/patch_tickets_ticket_id_request_inputs_inner.rb +286 -0
- data/lib/kickflow/models/patch_tickets_ticket_id_request_slip_items_inner.rb +225 -0
- data/lib/kickflow/models/patch_tickets_ticket_id_request_slip_items_inner_inputs_inner.rb +261 -0
- data/lib/kickflow/models/patch_users_user_id_request.rb +347 -0
- data/lib/kickflow/models/post_categories_request.rb +222 -0
- data/lib/kickflow/models/post_files200_response.rb +222 -0
- data/lib/kickflow/models/post_folders_request.rb +253 -0
- data/lib/kickflow/models/post_general_masters_general_master_id_items_request.rb +283 -0
- data/lib/kickflow/models/post_general_masters_general_master_id_items_request_inputs_inner.rb +238 -0
- data/lib/kickflow/models/post_general_masters_general_master_id_items_request_inputs_inner_value.rb +106 -0
- data/lib/kickflow/models/post_general_masters_request.rb +254 -0
- data/lib/kickflow/models/post_general_masters_request_fields_inner.rb +341 -0
- data/lib/kickflow/models/post_organization_charts_organization_chart_id_activate_request.rb +215 -0
- data/lib/kickflow/models/post_proxy_applicants_request.rb +273 -0
- data/lib/kickflow/models/post_proxy_approvers_request.rb +273 -0
- data/lib/kickflow/models/post_roles_role_id_memberships_request.rb +252 -0
- data/lib/kickflow/models/post_teams_team_id_members_request.rb +252 -0
- data/lib/kickflow/models/post_teams_team_id_members_request_users_inner.rb +270 -0
- data/lib/kickflow/models/post_tickets_id_comments_request.rb +235 -0
- data/lib/kickflow/models/post_tickets_id_viewers_request.rb +236 -0
- data/lib/kickflow/models/post_tickets_id_viewers_request_team_id.rb +105 -0
- data/lib/kickflow/models/post_tickets_id_viewers_request_user_id.rb +105 -0
- data/lib/kickflow/models/post_tickets_request.rb +352 -0
- data/lib/kickflow/models/post_tickets_request_cloud_sign_document.rb +257 -0
- data/lib/kickflow/models/post_tickets_request_inputs_inner.rb +286 -0
- data/lib/kickflow/models/post_tickets_request_inputs_inner_team_id.rb +106 -0
- data/lib/kickflow/models/post_tickets_request_inputs_inner_ticket_id.rb +106 -0
- data/lib/kickflow/models/post_tickets_request_inputs_inner_user_id.rb +106 -0
- data/lib/kickflow/models/post_tickets_request_slip_items_inner.rb +225 -0
- data/lib/kickflow/models/post_tickets_request_slip_items_inner_inputs_inner.rb +259 -0
- data/lib/kickflow/models/post_tickets_request_slip_items_inner_inputs_inner_general_master_item_id.rb +106 -0
- data/lib/kickflow/models/post_tickets_request_slip_items_inner_inputs_inner_value.rb +106 -0
- data/lib/kickflow/models/post_tickets_ticket_id_reject_request.rb +222 -0
- data/lib/kickflow/models/post_users_request.rb +366 -0
- data/lib/kickflow/models/proxy_applicant.rb +334 -0
- data/lib/kickflow/models/proxy_approver.rb +334 -0
- data/lib/kickflow/models/role.rb +346 -0
- data/lib/kickflow/models/role_create_body.rb +242 -0
- data/lib/kickflow/models/role_create_body_permission_list_inner.rb +309 -0
- data/lib/kickflow/models/role_detail.rb +372 -0
- data/lib/kickflow/models/role_detail_all_of_permission_list.rb +330 -0
- data/lib/kickflow/models/role_update_body.rb +228 -0
- data/lib/kickflow/models/role_update_body_permission_list_inner.rb +330 -0
- data/lib/kickflow/models/route.rb +429 -0
- data/lib/kickflow/models/route_detail.rb +453 -0
- data/lib/kickflow/models/route_step.rb +495 -0
- data/lib/kickflow/models/route_step_condition.rb +292 -0
- data/lib/kickflow/models/route_step_condition_field.rb +293 -0
- data/lib/kickflow/models/route_step_target.rb +246 -0
- data/lib/kickflow/models/section.rb +336 -0
- data/lib/kickflow/models/slip_field.rb +535 -0
- data/lib/kickflow/models/slip_field_detail.rb +562 -0
- data/lib/kickflow/models/slip_item.rb +276 -0
- data/lib/kickflow/models/slip_item_input.rb +324 -0
- data/lib/kickflow/models/slip_item_input_value.rb +107 -0
- data/lib/kickflow/models/sub_status.rb +302 -0
- data/lib/kickflow/models/team.rb +399 -0
- data/lib/kickflow/models/team_create_body.rb +253 -0
- data/lib/kickflow/models/team_detail.rb +454 -0
- data/lib/kickflow/models/team_update_body.rb +246 -0
- data/lib/kickflow/models/ticket.rb +540 -0
- data/lib/kickflow/models/ticket_assignee.rb +303 -0
- data/lib/kickflow/models/ticket_detail.rb +684 -0
- data/lib/kickflow/models/ticket_detail_all_of_cloud_sign_document.rb +375 -0
- data/lib/kickflow/models/ticket_input.rb +308 -0
- data/lib/kickflow/models/ticket_input_value.rb +107 -0
- data/lib/kickflow/models/ticket_section.rb +259 -0
- data/lib/kickflow/models/ticket_step.rb +471 -0
- data/lib/kickflow/models/ticket_viewer.rb +259 -0
- data/lib/kickflow/models/ticket_workflow.rb +105 -0
- data/lib/kickflow/models/user.rb +558 -0
- data/lib/kickflow/models/user_detail.rb +565 -0
- data/lib/kickflow/models/user_image.rb +222 -0
- data/lib/kickflow/models/workflow.rb +693 -0
- data/lib/kickflow/models/workflow_detail.rb +796 -0
- data/lib/kickflow/models/workflow_in_ticket.rb +770 -0
- data/lib/kickflow/models/workflow_in_ticket_all_of_cloud_sign_setting.rb +222 -0
- data/lib/kickflow/models/workflow_route_condition.rb +364 -0
- data/lib/kickflow/models/workflow_route_condition_field.rb +305 -0
- data/lib/kickflow/models/workflow_ticket_viewer.rb +259 -0
- data/lib/kickflow/version.rb +15 -0
- data/lib/kickflow.rb +159 -0
- data/manifest.scm +1 -0
- data/manifest.scm~ +1 -0
- data/pkg/kickflow-0.1.0.gem +0 -0
- data/sig/kickflow.rbs +4 -0
- data/spec/api/_api_spec.rb +1260 -0
- data/spec/models/attachment_spec.rb +48 -0
- data/spec/models/category_spec.rb +54 -0
- data/spec/models/climber_cloud_setting_mappings_inner_spec.rb +42 -0
- data/spec/models/climber_cloud_setting_spec.rb +54 -0
- data/spec/models/comment_spec.rb +78 -0
- data/spec/models/delete_teams_team_id_members_request_spec.rb +36 -0
- data/spec/models/external_api_setting_headers_inner_spec.rb +42 -0
- data/spec/models/external_api_setting_mappings_inner_spec.rb +54 -0
- data/spec/models/external_api_setting_spec.rb +76 -0
- data/spec/models/folder_detail_spec.rb +96 -0
- data/spec/models/folder_spec.rb +84 -0
- data/spec/models/form_field_detail_spec.rb +194 -0
- data/spec/models/form_field_spec.rb +170 -0
- data/spec/models/general_master_field_spec.rb +94 -0
- data/spec/models/general_master_item_inputs_inner_spec.rb +60 -0
- data/spec/models/general_master_item_inputs_inner_value_spec.rb +21 -0
- data/spec/models/general_master_item_spec.rb +84 -0
- data/spec/models/general_master_spec.rb +72 -0
- data/spec/models/get_files_signed_id200_response_spec.rb +66 -0
- data/spec/models/get_tickets_status_parameter_spec.rb +32 -0
- data/spec/models/grade_create_body_spec.rb +48 -0
- data/spec/models/grade_spec.rb +72 -0
- data/spec/models/grade_update_body_spec.rb +48 -0
- data/spec/models/label_spec.rb +66 -0
- data/spec/models/member_user_spec.rb +124 -0
- data/spec/models/organization_chart_activation_plan_spec.rb +54 -0
- data/spec/models/organization_chart_body_spec.rb +36 -0
- data/spec/models/organization_chart_detail_spec.rb +78 -0
- data/spec/models/organization_chart_spec.rb +78 -0
- data/spec/models/patch_folders_folder_id_request_spec.rb +54 -0
- data/spec/models/patch_general_masters_general_master_id_items_item_id_request_inputs_inner_spec.rb +42 -0
- data/spec/models/patch_general_masters_general_master_id_items_item_id_request_inputs_inner_value_spec.rb +32 -0
- data/spec/models/patch_general_masters_general_master_id_items_item_id_request_spec.rb +66 -0
- data/spec/models/patch_general_masters_general_master_id_request_fields_inner_spec.rb +72 -0
- data/spec/models/patch_general_masters_general_master_id_request_spec.rb +54 -0
- data/spec/models/patch_teams_team_id_memberships_user_id_request_spec.rb +42 -0
- data/spec/models/patch_tickets_id_comments_comment_id_request_spec.rb +36 -0
- data/spec/models/patch_tickets_ticket_id_request_cloud_sign_document_spec.rb +48 -0
- data/spec/models/patch_tickets_ticket_id_request_inputs_inner_spec.rb +78 -0
- data/spec/models/patch_tickets_ticket_id_request_slip_items_inner_inputs_inner_spec.rb +60 -0
- data/spec/models/patch_tickets_ticket_id_request_slip_items_inner_spec.rb +36 -0
- data/spec/models/patch_tickets_ticket_id_request_spec.rb +76 -0
- data/spec/models/patch_users_user_id_request_spec.rb +60 -0
- data/spec/models/post_categories_request_spec.rb +36 -0
- data/spec/models/post_files200_response_spec.rb +36 -0
- data/spec/models/post_folders_request_spec.rb +54 -0
- data/spec/models/post_general_masters_general_master_id_items_request_inputs_inner_spec.rb +42 -0
- data/spec/models/post_general_masters_general_master_id_items_request_inputs_inner_value_spec.rb +32 -0
- data/spec/models/post_general_masters_general_master_id_items_request_spec.rb +66 -0
- data/spec/models/post_general_masters_request_fields_inner_spec.rb +76 -0
- data/spec/models/post_general_masters_request_spec.rb +54 -0
- data/spec/models/post_organization_charts_organization_chart_id_activate_request_spec.rb +36 -0
- data/spec/models/post_proxy_applicants_request_spec.rb +60 -0
- data/spec/models/post_proxy_approvers_request_spec.rb +60 -0
- data/spec/models/post_roles_role_id_memberships_request_spec.rb +36 -0
- data/spec/models/post_teams_team_id_members_request_spec.rb +36 -0
- data/spec/models/post_teams_team_id_members_request_users_inner_spec.rb +48 -0
- data/spec/models/post_tickets_id_comments_request_spec.rb +42 -0
- data/spec/models/post_tickets_id_viewers_request_spec.rb +48 -0
- data/spec/models/post_tickets_id_viewers_request_team_id_spec.rb +21 -0
- data/spec/models/post_tickets_id_viewers_request_user_id_spec.rb +21 -0
- data/spec/models/post_tickets_request_cloud_sign_document_spec.rb +48 -0
- data/spec/models/post_tickets_request_inputs_inner_spec.rb +78 -0
- data/spec/models/post_tickets_request_inputs_inner_team_id_spec.rb +32 -0
- data/spec/models/post_tickets_request_inputs_inner_ticket_id_spec.rb +32 -0
- data/spec/models/post_tickets_request_inputs_inner_user_id_spec.rb +32 -0
- data/spec/models/post_tickets_request_slip_items_inner_inputs_inner_general_master_item_id_spec.rb +32 -0
- data/spec/models/post_tickets_request_slip_items_inner_inputs_inner_spec.rb +60 -0
- data/spec/models/post_tickets_request_slip_items_inner_inputs_inner_value_spec.rb +32 -0
- data/spec/models/post_tickets_request_slip_items_inner_spec.rb +36 -0
- data/spec/models/post_tickets_request_spec.rb +82 -0
- data/spec/models/post_tickets_ticket_id_reject_request_spec.rb +36 -0
- data/spec/models/post_users_request_spec.rb +66 -0
- data/spec/models/proxy_applicant_spec.rb +78 -0
- data/spec/models/proxy_approver_spec.rb +78 -0
- data/spec/models/role_create_body_permission_list_inner_spec.rb +64 -0
- data/spec/models/role_create_body_spec.rb +42 -0
- data/spec/models/role_detail_all_of_permission_list_spec.rb +64 -0
- data/spec/models/role_detail_spec.rb +72 -0
- data/spec/models/role_spec.rb +66 -0
- data/spec/models/role_update_body_permission_list_inner_spec.rb +64 -0
- data/spec/models/role_update_body_spec.rb +42 -0
- data/spec/models/route_detail_spec.rb +112 -0
- data/spec/models/route_spec.rb +106 -0
- data/spec/models/route_step_condition_field_spec.rb +84 -0
- data/spec/models/route_step_condition_spec.rb +62 -0
- data/spec/models/route_step_spec.rb +126 -0
- data/spec/models/route_step_target_spec.rb +54 -0
- data/spec/models/section_spec.rb +78 -0
- data/spec/models/slip_field_detail_spec.rb +166 -0
- data/spec/models/slip_field_spec.rb +154 -0
- data/spec/models/slip_item_input_spec.rb +72 -0
- data/spec/models/slip_item_input_value_spec.rb +21 -0
- data/spec/models/slip_item_spec.rb +54 -0
- data/spec/models/sub_status_spec.rb +66 -0
- data/spec/models/team_create_body_spec.rb +54 -0
- data/spec/models/team_detail_spec.rb +96 -0
- data/spec/models/team_spec.rb +78 -0
- data/spec/models/team_update_body_spec.rb +54 -0
- data/spec/models/ticket_assignee_spec.rb +66 -0
- data/spec/models/ticket_detail_all_of_cloud_sign_document_spec.rb +82 -0
- data/spec/models/ticket_detail_spec.rb +194 -0
- data/spec/models/ticket_input_spec.rb +78 -0
- data/spec/models/ticket_input_value_spec.rb +21 -0
- data/spec/models/ticket_section_spec.rb +48 -0
- data/spec/models/ticket_spec.rb +140 -0
- data/spec/models/ticket_step_spec.rb +122 -0
- data/spec/models/ticket_viewer_spec.rb +54 -0
- data/spec/models/ticket_workflow_spec.rb +21 -0
- data/spec/models/user_detail_spec.rb +112 -0
- data/spec/models/user_image_spec.rb +36 -0
- data/spec/models/user_spec.rb +112 -0
- data/spec/models/workflow_detail_spec.rb +226 -0
- data/spec/models/workflow_in_ticket_all_of_cloud_sign_setting_spec.rb +36 -0
- data/spec/models/workflow_in_ticket_spec.rb +220 -0
- data/spec/models/workflow_route_condition_field_spec.rb +72 -0
- data/spec/models/workflow_route_condition_spec.rb +80 -0
- data/spec/models/workflow_spec.rb +196 -0
- data/spec/models/workflow_ticket_viewer_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- data/vendor/schema.yaml +6258 -0
- metadata +600 -0
@@ -0,0 +1,352 @@
|
|
1
|
+
=begin
|
2
|
+
#kickflow REST API v1
|
3
|
+
|
4
|
+
#kickflowの開発者用REST API (v1)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.7.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Kickflow
|
17
|
+
class PostTicketsRequest
|
18
|
+
# ステータス。作成ではdraftまたはin_progressのみ選択可能です。
|
19
|
+
attr_accessor :status
|
20
|
+
|
21
|
+
# ワークフローのUUID
|
22
|
+
attr_accessor :workflow_id
|
23
|
+
|
24
|
+
# 申請者チームのUUID
|
25
|
+
attr_accessor :author_team_id
|
26
|
+
|
27
|
+
# 依頼者となるユーザーのUUID。代理申請の場合のみ指定してください。
|
28
|
+
attr_accessor :proxy_client_user_id
|
29
|
+
|
30
|
+
# チケットのタイトル。ワークフローでtitleInputModeがinputのときのみ設定可能です。
|
31
|
+
attr_accessor :title
|
32
|
+
|
33
|
+
# 明細アイテムの配列。明細ワークフローの場合、このフィールドは必須です。
|
34
|
+
attr_accessor :slip_items
|
35
|
+
|
36
|
+
# フォームの入力の配列。ワークフローのすべてのフォームフィールドに対応する入力を入れてください。
|
37
|
+
attr_accessor :inputs
|
38
|
+
|
39
|
+
attr_accessor :cloud_sign_document
|
40
|
+
|
41
|
+
class EnumAttributeValidator
|
42
|
+
attr_reader :datatype
|
43
|
+
attr_reader :allowable_values
|
44
|
+
|
45
|
+
def initialize(datatype, allowable_values)
|
46
|
+
@allowable_values = allowable_values.map do |value|
|
47
|
+
case datatype.to_s
|
48
|
+
when /Integer/i
|
49
|
+
value.to_i
|
50
|
+
when /Float/i
|
51
|
+
value.to_f
|
52
|
+
else
|
53
|
+
value
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def valid?(value)
|
59
|
+
!value || allowable_values.include?(value)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
64
|
+
def self.attribute_map
|
65
|
+
{
|
66
|
+
:'status' => :'status',
|
67
|
+
:'workflow_id' => :'workflowId',
|
68
|
+
:'author_team_id' => :'authorTeamId',
|
69
|
+
:'proxy_client_user_id' => :'proxyClientUserId',
|
70
|
+
:'title' => :'title',
|
71
|
+
:'slip_items' => :'slipItems',
|
72
|
+
:'inputs' => :'inputs',
|
73
|
+
:'cloud_sign_document' => :'cloudSignDocument'
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
77
|
+
# Returns all the JSON keys this model knows about
|
78
|
+
def self.acceptable_attributes
|
79
|
+
attribute_map.values
|
80
|
+
end
|
81
|
+
|
82
|
+
# Attribute type mapping.
|
83
|
+
def self.openapi_types
|
84
|
+
{
|
85
|
+
:'status' => :'String',
|
86
|
+
:'workflow_id' => :'String',
|
87
|
+
:'author_team_id' => :'String',
|
88
|
+
:'proxy_client_user_id' => :'String',
|
89
|
+
:'title' => :'String',
|
90
|
+
:'slip_items' => :'Array<PostTicketsRequestSlipItemsInner>',
|
91
|
+
:'inputs' => :'Array<PostTicketsRequestInputsInner>',
|
92
|
+
:'cloud_sign_document' => :'PostTicketsRequestCloudSignDocument'
|
93
|
+
}
|
94
|
+
end
|
95
|
+
|
96
|
+
# List of attributes with nullable: true
|
97
|
+
def self.openapi_nullable
|
98
|
+
Set.new([
|
99
|
+
:'proxy_client_user_id',
|
100
|
+
:'title',
|
101
|
+
])
|
102
|
+
end
|
103
|
+
|
104
|
+
# Initializes the object
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
106
|
+
def initialize(attributes = {})
|
107
|
+
if (!attributes.is_a?(Hash))
|
108
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Kickflow::PostTicketsRequest` initialize method"
|
109
|
+
end
|
110
|
+
|
111
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
112
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
113
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
114
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Kickflow::PostTicketsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
115
|
+
end
|
116
|
+
h[k.to_sym] = v
|
117
|
+
}
|
118
|
+
|
119
|
+
if attributes.key?(:'status')
|
120
|
+
self.status = attributes[:'status']
|
121
|
+
else
|
122
|
+
self.status = nil
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'workflow_id')
|
126
|
+
self.workflow_id = attributes[:'workflow_id']
|
127
|
+
else
|
128
|
+
self.workflow_id = nil
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.key?(:'author_team_id')
|
132
|
+
self.author_team_id = attributes[:'author_team_id']
|
133
|
+
else
|
134
|
+
self.author_team_id = nil
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'proxy_client_user_id')
|
138
|
+
self.proxy_client_user_id = attributes[:'proxy_client_user_id']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.key?(:'title')
|
142
|
+
self.title = attributes[:'title']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.key?(:'slip_items')
|
146
|
+
if (value = attributes[:'slip_items']).is_a?(Array)
|
147
|
+
self.slip_items = value
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.key?(:'inputs')
|
152
|
+
if (value = attributes[:'inputs']).is_a?(Array)
|
153
|
+
self.inputs = value
|
154
|
+
end
|
155
|
+
else
|
156
|
+
self.inputs = nil
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.key?(:'cloud_sign_document')
|
160
|
+
self.cloud_sign_document = attributes[:'cloud_sign_document']
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
165
|
+
# @return Array for valid properties with the reasons
|
166
|
+
def list_invalid_properties
|
167
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
168
|
+
invalid_properties = Array.new
|
169
|
+
if @status.nil?
|
170
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
171
|
+
end
|
172
|
+
|
173
|
+
if @workflow_id.nil?
|
174
|
+
invalid_properties.push('invalid value for "workflow_id", workflow_id cannot be nil.')
|
175
|
+
end
|
176
|
+
|
177
|
+
if @author_team_id.nil?
|
178
|
+
invalid_properties.push('invalid value for "author_team_id", author_team_id cannot be nil.')
|
179
|
+
end
|
180
|
+
|
181
|
+
if @inputs.nil?
|
182
|
+
invalid_properties.push('invalid value for "inputs", inputs cannot be nil.')
|
183
|
+
end
|
184
|
+
|
185
|
+
invalid_properties
|
186
|
+
end
|
187
|
+
|
188
|
+
# Check to see if the all the properties in the model are valid
|
189
|
+
# @return true if the model is valid
|
190
|
+
def valid?
|
191
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
192
|
+
return false if @status.nil?
|
193
|
+
status_validator = EnumAttributeValidator.new('String', ["draft", "in_progress"])
|
194
|
+
return false unless status_validator.valid?(@status)
|
195
|
+
return false if @workflow_id.nil?
|
196
|
+
return false if @author_team_id.nil?
|
197
|
+
return false if @inputs.nil?
|
198
|
+
true
|
199
|
+
end
|
200
|
+
|
201
|
+
# Custom attribute writer method checking allowed values (enum).
|
202
|
+
# @param [Object] status Object to be assigned
|
203
|
+
def status=(status)
|
204
|
+
validator = EnumAttributeValidator.new('String', ["draft", "in_progress"])
|
205
|
+
unless validator.valid?(status)
|
206
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
207
|
+
end
|
208
|
+
@status = status
|
209
|
+
end
|
210
|
+
|
211
|
+
# Checks equality by comparing each attribute.
|
212
|
+
# @param [Object] Object to be compared
|
213
|
+
def ==(o)
|
214
|
+
return true if self.equal?(o)
|
215
|
+
self.class == o.class &&
|
216
|
+
status == o.status &&
|
217
|
+
workflow_id == o.workflow_id &&
|
218
|
+
author_team_id == o.author_team_id &&
|
219
|
+
proxy_client_user_id == o.proxy_client_user_id &&
|
220
|
+
title == o.title &&
|
221
|
+
slip_items == o.slip_items &&
|
222
|
+
inputs == o.inputs &&
|
223
|
+
cloud_sign_document == o.cloud_sign_document
|
224
|
+
end
|
225
|
+
|
226
|
+
# @see the `==` method
|
227
|
+
# @param [Object] Object to be compared
|
228
|
+
def eql?(o)
|
229
|
+
self == o
|
230
|
+
end
|
231
|
+
|
232
|
+
# Calculates hash code according to all attributes.
|
233
|
+
# @return [Integer] Hash code
|
234
|
+
def hash
|
235
|
+
[status, workflow_id, author_team_id, proxy_client_user_id, title, slip_items, inputs, cloud_sign_document].hash
|
236
|
+
end
|
237
|
+
|
238
|
+
# Builds the object from hash
|
239
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
240
|
+
# @return [Object] Returns the model itself
|
241
|
+
def self.build_from_hash(attributes)
|
242
|
+
return nil unless attributes.is_a?(Hash)
|
243
|
+
attributes = attributes.transform_keys(&:to_sym)
|
244
|
+
transformed_hash = {}
|
245
|
+
openapi_types.each_pair do |key, type|
|
246
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
247
|
+
transformed_hash["#{key}"] = nil
|
248
|
+
elsif type =~ /\AArray<(.*)>/i
|
249
|
+
# check to ensure the input is an array given that the attribute
|
250
|
+
# is documented as an array but the input is not
|
251
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
252
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
253
|
+
end
|
254
|
+
elsif !attributes[attribute_map[key]].nil?
|
255
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
256
|
+
end
|
257
|
+
end
|
258
|
+
new(transformed_hash)
|
259
|
+
end
|
260
|
+
|
261
|
+
# Deserializes the data based on type
|
262
|
+
# @param string type Data type
|
263
|
+
# @param string value Value to be deserialized
|
264
|
+
# @return [Object] Deserialized data
|
265
|
+
def self._deserialize(type, value)
|
266
|
+
case type.to_sym
|
267
|
+
when :Time
|
268
|
+
Time.parse(value)
|
269
|
+
when :Date
|
270
|
+
Date.parse(value)
|
271
|
+
when :String
|
272
|
+
value.to_s
|
273
|
+
when :Integer
|
274
|
+
value.to_i
|
275
|
+
when :Float
|
276
|
+
value.to_f
|
277
|
+
when :Boolean
|
278
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
279
|
+
true
|
280
|
+
else
|
281
|
+
false
|
282
|
+
end
|
283
|
+
when :Object
|
284
|
+
# generic object (usually a Hash), return directly
|
285
|
+
value
|
286
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
287
|
+
inner_type = Regexp.last_match[:inner_type]
|
288
|
+
value.map { |v| _deserialize(inner_type, v) }
|
289
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
290
|
+
k_type = Regexp.last_match[:k_type]
|
291
|
+
v_type = Regexp.last_match[:v_type]
|
292
|
+
{}.tap do |hash|
|
293
|
+
value.each do |k, v|
|
294
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
295
|
+
end
|
296
|
+
end
|
297
|
+
else # model
|
298
|
+
# models (e.g. Pet) or oneOf
|
299
|
+
klass = Kickflow.const_get(type)
|
300
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
# Returns the string representation of the object
|
305
|
+
# @return [String] String presentation of the object
|
306
|
+
def to_s
|
307
|
+
to_hash.to_s
|
308
|
+
end
|
309
|
+
|
310
|
+
# to_body is an alias to to_hash (backward compatibility)
|
311
|
+
# @return [Hash] Returns the object in the form of hash
|
312
|
+
def to_body
|
313
|
+
to_hash
|
314
|
+
end
|
315
|
+
|
316
|
+
# Returns the object in the form of hash
|
317
|
+
# @return [Hash] Returns the object in the form of hash
|
318
|
+
def to_hash
|
319
|
+
hash = {}
|
320
|
+
self.class.attribute_map.each_pair do |attr, param|
|
321
|
+
value = self.send(attr)
|
322
|
+
if value.nil?
|
323
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
324
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
325
|
+
end
|
326
|
+
|
327
|
+
hash[param] = _to_hash(value)
|
328
|
+
end
|
329
|
+
hash
|
330
|
+
end
|
331
|
+
|
332
|
+
# Outputs non-array value in the form of hash
|
333
|
+
# For object, use to_hash. Otherwise, just return the value
|
334
|
+
# @param [Object] value Any valid value
|
335
|
+
# @return [Hash] Returns the value in the form of hash
|
336
|
+
def _to_hash(value)
|
337
|
+
if value.is_a?(Array)
|
338
|
+
value.compact.map { |v| _to_hash(v) }
|
339
|
+
elsif value.is_a?(Hash)
|
340
|
+
{}.tap do |hash|
|
341
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
342
|
+
end
|
343
|
+
elsif value.respond_to? :to_hash
|
344
|
+
value.to_hash
|
345
|
+
else
|
346
|
+
value
|
347
|
+
end
|
348
|
+
end
|
349
|
+
|
350
|
+
end
|
351
|
+
|
352
|
+
end
|
@@ -0,0 +1,257 @@
|
|
1
|
+
=begin
|
2
|
+
#kickflow REST API v1
|
3
|
+
|
4
|
+
#kickflowの開発者用REST API (v1)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.7.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Kickflow
|
17
|
+
# クラウドサイン書類。ワークフローでクラウドサイン連携が有効な場合のみ指定してください。
|
18
|
+
class PostTicketsRequestCloudSignDocument
|
19
|
+
# クラウドサイン書類のID
|
20
|
+
attr_accessor :id
|
21
|
+
|
22
|
+
# クラウドサイン書類のタイトル
|
23
|
+
attr_accessor :title
|
24
|
+
|
25
|
+
# クラウドサインのサンドボックス環境の場合true
|
26
|
+
attr_accessor :sandbox
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'id' => :'id',
|
32
|
+
:'title' => :'title',
|
33
|
+
:'sandbox' => :'sandbox'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'id' => :'String',
|
46
|
+
:'title' => :'String',
|
47
|
+
:'sandbox' => :'String'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Kickflow::PostTicketsRequestCloudSignDocument` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Kickflow::PostTicketsRequestCloudSignDocument`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
+
end
|
69
|
+
h[k.to_sym] = v
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'id')
|
73
|
+
self.id = attributes[:'id']
|
74
|
+
else
|
75
|
+
self.id = nil
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'title')
|
79
|
+
self.title = attributes[:'title']
|
80
|
+
else
|
81
|
+
self.title = nil
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'sandbox')
|
85
|
+
self.sandbox = attributes[:'sandbox']
|
86
|
+
else
|
87
|
+
self.sandbox = nil
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
92
|
+
# @return Array for valid properties with the reasons
|
93
|
+
def list_invalid_properties
|
94
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
95
|
+
invalid_properties = Array.new
|
96
|
+
if @id.nil?
|
97
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
98
|
+
end
|
99
|
+
|
100
|
+
if @title.nil?
|
101
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
102
|
+
end
|
103
|
+
|
104
|
+
if @sandbox.nil?
|
105
|
+
invalid_properties.push('invalid value for "sandbox", sandbox cannot be nil.')
|
106
|
+
end
|
107
|
+
|
108
|
+
invalid_properties
|
109
|
+
end
|
110
|
+
|
111
|
+
# Check to see if the all the properties in the model are valid
|
112
|
+
# @return true if the model is valid
|
113
|
+
def valid?
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
115
|
+
return false if @id.nil?
|
116
|
+
return false if @title.nil?
|
117
|
+
return false if @sandbox.nil?
|
118
|
+
true
|
119
|
+
end
|
120
|
+
|
121
|
+
# Checks equality by comparing each attribute.
|
122
|
+
# @param [Object] Object to be compared
|
123
|
+
def ==(o)
|
124
|
+
return true if self.equal?(o)
|
125
|
+
self.class == o.class &&
|
126
|
+
id == o.id &&
|
127
|
+
title == o.title &&
|
128
|
+
sandbox == o.sandbox
|
129
|
+
end
|
130
|
+
|
131
|
+
# @see the `==` method
|
132
|
+
# @param [Object] Object to be compared
|
133
|
+
def eql?(o)
|
134
|
+
self == o
|
135
|
+
end
|
136
|
+
|
137
|
+
# Calculates hash code according to all attributes.
|
138
|
+
# @return [Integer] Hash code
|
139
|
+
def hash
|
140
|
+
[id, title, sandbox].hash
|
141
|
+
end
|
142
|
+
|
143
|
+
# Builds the object from hash
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
+
# @return [Object] Returns the model itself
|
146
|
+
def self.build_from_hash(attributes)
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
148
|
+
attributes = attributes.transform_keys(&:to_sym)
|
149
|
+
transformed_hash = {}
|
150
|
+
openapi_types.each_pair do |key, type|
|
151
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
152
|
+
transformed_hash["#{key}"] = nil
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
154
|
+
# check to ensure the input is an array given that the attribute
|
155
|
+
# is documented as an array but the input is not
|
156
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
157
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
158
|
+
end
|
159
|
+
elsif !attributes[attribute_map[key]].nil?
|
160
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
161
|
+
end
|
162
|
+
end
|
163
|
+
new(transformed_hash)
|
164
|
+
end
|
165
|
+
|
166
|
+
# Deserializes the data based on type
|
167
|
+
# @param string type Data type
|
168
|
+
# @param string value Value to be deserialized
|
169
|
+
# @return [Object] Deserialized data
|
170
|
+
def self._deserialize(type, value)
|
171
|
+
case type.to_sym
|
172
|
+
when :Time
|
173
|
+
Time.parse(value)
|
174
|
+
when :Date
|
175
|
+
Date.parse(value)
|
176
|
+
when :String
|
177
|
+
value.to_s
|
178
|
+
when :Integer
|
179
|
+
value.to_i
|
180
|
+
when :Float
|
181
|
+
value.to_f
|
182
|
+
when :Boolean
|
183
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
184
|
+
true
|
185
|
+
else
|
186
|
+
false
|
187
|
+
end
|
188
|
+
when :Object
|
189
|
+
# generic object (usually a Hash), return directly
|
190
|
+
value
|
191
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
192
|
+
inner_type = Regexp.last_match[:inner_type]
|
193
|
+
value.map { |v| _deserialize(inner_type, v) }
|
194
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
195
|
+
k_type = Regexp.last_match[:k_type]
|
196
|
+
v_type = Regexp.last_match[:v_type]
|
197
|
+
{}.tap do |hash|
|
198
|
+
value.each do |k, v|
|
199
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
else # model
|
203
|
+
# models (e.g. Pet) or oneOf
|
204
|
+
klass = Kickflow.const_get(type)
|
205
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
# Returns the string representation of the object
|
210
|
+
# @return [String] String presentation of the object
|
211
|
+
def to_s
|
212
|
+
to_hash.to_s
|
213
|
+
end
|
214
|
+
|
215
|
+
# to_body is an alias to to_hash (backward compatibility)
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
217
|
+
def to_body
|
218
|
+
to_hash
|
219
|
+
end
|
220
|
+
|
221
|
+
# Returns the object in the form of hash
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
223
|
+
def to_hash
|
224
|
+
hash = {}
|
225
|
+
self.class.attribute_map.each_pair do |attr, param|
|
226
|
+
value = self.send(attr)
|
227
|
+
if value.nil?
|
228
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
229
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
230
|
+
end
|
231
|
+
|
232
|
+
hash[param] = _to_hash(value)
|
233
|
+
end
|
234
|
+
hash
|
235
|
+
end
|
236
|
+
|
237
|
+
# Outputs non-array value in the form of hash
|
238
|
+
# For object, use to_hash. Otherwise, just return the value
|
239
|
+
# @param [Object] value Any valid value
|
240
|
+
# @return [Hash] Returns the value in the form of hash
|
241
|
+
def _to_hash(value)
|
242
|
+
if value.is_a?(Array)
|
243
|
+
value.compact.map { |v| _to_hash(v) }
|
244
|
+
elsif value.is_a?(Hash)
|
245
|
+
{}.tap do |hash|
|
246
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
247
|
+
end
|
248
|
+
elsif value.respond_to? :to_hash
|
249
|
+
value.to_hash
|
250
|
+
else
|
251
|
+
value
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
end
|
256
|
+
|
257
|
+
end
|