crisphive 0.1.0 → 0.3.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 +4 -4
- data/README.md +183 -16
- data/crisphive.gemspec +5 -5
- data/lib/crisphive/api/business_skill_api.rb +502 -8
- data/lib/crisphive/api/customer_api.rb +20 -14
- data/lib/crisphive/api/job_request_business_api.rb +1273 -167
- data/lib/crisphive/api/job_types_api.rb +214 -2
- data/lib/crisphive/api/permission_api.rb +79 -0
- data/lib/crisphive/api/service_area_api.rb +214 -6
- data/lib/crisphive/api/technician_api.rb +510 -6
- data/lib/crisphive/api/technician_time_off_api.rb +240 -0
- data/lib/crisphive/api/vehicle_api.rb +214 -6
- data/lib/crisphive/api/webhooks_api.rb +213 -0
- data/lib/crisphive/api_client.rb +2 -2
- data/lib/crisphive/api_error.rb +2 -2
- data/lib/crisphive/configuration.rb +3 -3
- data/lib/crisphive/models/api_internal_techtimeoff_actions.rb +232 -0
- data/lib/crisphive/models/api_internal_techtimeoff_status.rb +42 -0
- data/lib/crisphive/models/assignable_group.rb +289 -0
- data/lib/crisphive/models/book_and_confirm_job_request200_response.rb +253 -0
- data/lib/crisphive/models/commit_absence_resolve200_response.rb +253 -0
- data/lib/crisphive/models/commit_emergency_reschedule200_response.rb +253 -0
- data/lib/crisphive/models/commit_job_request_move200_response.rb +253 -0
- data/lib/crisphive/models/create_customer200_response.rb +5 -2
- data/lib/crisphive/models/create_job_request200_response.rb +5 -2
- data/lib/crisphive/models/create_job_type200_response.rb +253 -0
- data/lib/crisphive/models/create_service_area200_response.rb +253 -0
- data/lib/crisphive/models/create_skill200_response.rb +253 -0
- data/lib/crisphive/models/create_skill_category200_response.rb +253 -0
- data/lib/crisphive/models/create_technician200_response.rb +253 -0
- data/lib/crisphive/models/create_technician_time_off200_response.rb +253 -0
- data/lib/crisphive/models/create_vehicle200_response.rb +253 -0
- data/lib/crisphive/models/create_webhook_endpoint200_response.rb +253 -0
- data/lib/crisphive/models/customer.rb +13 -3
- data/lib/crisphive/models/customer_address.rb +2 -2
- data/lib/crisphive/models/customer_address_request.rb +11 -2
- data/lib/crisphive/models/customer_contact.rb +27 -7
- data/lib/crisphive/models/customer_create_request.rb +14 -4
- data/lib/crisphive/models/customer_create_response.rb +2 -2
- data/lib/crisphive/models/customer_list.rb +3 -3
- data/lib/crisphive/models/customer_list_item.rb +13 -3
- data/lib/crisphive/models/customer_profile.rb +2 -2
- data/lib/crisphive/models/customer_quick_books_link.rb +235 -0
- data/lib/crisphive/models/customer_service_area_ref.rb +225 -0
- data/lib/crisphive/models/customer_spending.rb +2 -2
- data/lib/crisphive/models/customer_technician_ref.rb +225 -0
- data/lib/crisphive/models/customer_tier_progress.rb +2 -2
- data/lib/crisphive/models/customer_update_request.rb +25 -22
- data/lib/crisphive/models/get_customer200_response.rb +5 -2
- data/lib/crisphive/models/get_job_request200_response.rb +5 -2
- data/lib/crisphive/models/get_job_request_timeline200_response.rb +5 -2
- data/lib/crisphive/models/get_job_type200_response.rb +5 -2
- data/lib/crisphive/models/get_service_area200_response.rb +5 -2
- data/lib/crisphive/models/get_technician200_response.rb +5 -2
- data/lib/crisphive/models/get_technician_schedule200_response.rb +253 -0
- data/lib/crisphive/models/get_vehicle200_response.rb +5 -2
- data/lib/crisphive/models/internal_jobrequest_http_address_req.rb +475 -0
- data/lib/crisphive/models/job_date.rb +5 -3
- data/lib/crisphive/models/job_date_business_range.rb +7 -3
- data/lib/crisphive/models/job_date_period.rb +2 -2
- data/lib/crisphive/models/job_date_period_entry.rb +4 -2
- data/lib/crisphive/models/job_request.rb +56 -6
- data/lib/crisphive/models/job_request_absence_alternative.rb +356 -0
- data/lib/crisphive/models/job_request_absence_alternative_cost.rb +275 -0
- data/lib/crisphive/models/job_request_absence_assignment.rb +319 -0
- data/lib/crisphive/models/job_request_absence_commit_request.rb +296 -0
- data/lib/crisphive/models/job_request_absence_notification.rb +283 -0
- data/lib/crisphive/models/job_request_absence_plan.rb +322 -0
- data/lib/crisphive/models/job_request_absence_preview_request.rb +280 -0
- data/lib/crisphive/models/job_request_absence_resolved_job.rb +499 -0
- data/lib/crisphive/models/job_request_absence_solver.rb +289 -0
- data/lib/crisphive/models/job_request_absence_time_off.rb +281 -0
- data/lib/crisphive/models/job_request_absence_unresolved_job.rb +364 -0
- data/lib/crisphive/models/job_request_action_audit_by.rb +2 -2
- data/lib/crisphive/models/job_request_action_audit_entry.rb +3 -3
- data/lib/crisphive/models/job_request_action_summary.rb +3 -3
- data/lib/crisphive/models/job_request_address_summary.rb +2 -2
- data/lib/crisphive/models/job_request_archive_summary.rb +2 -2
- data/lib/crisphive/models/job_request_arrival_window.rb +4 -4
- data/lib/crisphive/models/job_request_assigned_vehicle.rb +2 -2
- data/lib/crisphive/models/job_request_assignment_summary.rb +2 -2
- data/lib/crisphive/models/job_request_attention_summary.rb +259 -0
- data/lib/crisphive/models/job_request_available_vehicle.rb +235 -0
- data/lib/crisphive/models/job_request_blocker.rb +363 -0
- data/lib/crisphive/models/job_request_blocker_ref.rb +223 -0
- data/lib/crisphive/models/job_request_book_and_confirm_customer.rb +302 -0
- data/lib/crisphive/models/job_request_book_and_confirm_emergency.rb +315 -0
- data/lib/crisphive/models/job_request_book_and_confirm_emergency_result.rb +279 -0
- data/lib/crisphive/models/job_request_book_and_confirm_refusal.rb +280 -0
- data/lib/crisphive/models/job_request_book_and_confirm_request.rb +466 -0
- data/lib/crisphive/models/job_request_book_and_confirm_response.rb +295 -0
- data/lib/crisphive/models/job_request_booking_windows.rb +2 -2
- data/lib/crisphive/models/job_request_buddy_slot_candidates.rb +239 -0
- data/lib/crisphive/models/job_request_business_time_range.rb +3 -3
- data/lib/crisphive/models/job_request_changes.rb +2 -2
- data/lib/crisphive/models/job_request_confirm_request.rb +255 -0
- data/lib/crisphive/models/job_request_create_request.rb +61 -7
- data/lib/crisphive/models/job_request_create_response.rb +2 -2
- data/lib/crisphive/models/job_request_crew_candidates.rb +227 -0
- data/lib/crisphive/models/job_request_crew_change.rb +299 -0
- data/lib/crisphive/models/job_request_crew_member.rb +7 -4
- data/lib/crisphive/models/job_request_crew_member_input.rb +284 -0
- data/lib/crisphive/models/job_request_crew_recommendation.rb +255 -0
- data/lib/crisphive/models/job_request_customer_summary.rb +2 -2
- data/lib/crisphive/models/job_request_day_windows.rb +3 -3
- data/lib/crisphive/models/job_request_emergency_candidate.rb +319 -0
- data/lib/crisphive/models/job_request_emergency_candidates.rb +311 -0
- data/lib/crisphive/models/job_request_emergency_candidates_request.rb +341 -0
- data/lib/crisphive/models/job_request_emergency_commit_request.rb +361 -0
- data/lib/crisphive/models/job_request_emergency_inline_job.rb +353 -0
- data/lib/crisphive/models/job_request_emergency_plan.rb +367 -0
- data/lib/crisphive/models/job_request_emergency_preview_request.rb +342 -0
- data/lib/crisphive/models/job_request_job_date_business_range_request.rb +3 -3
- data/lib/crisphive/models/job_request_job_date_period_request.rb +2 -2
- data/lib/crisphive/models/job_request_job_date_request.rb +3 -3
- data/lib/crisphive/models/job_request_lead_candidate.rb +311 -0
- data/lib/crisphive/models/job_request_list.rb +2 -2
- data/lib/crisphive/models/job_request_move_commit_req.rb +353 -0
- data/lib/crisphive/models/job_request_move_member.rb +299 -0
- data/lib/crisphive/models/job_request_move_plan.rb +387 -0
- data/lib/crisphive/models/job_request_move_preview_req.rb +300 -0
- data/lib/crisphive/models/job_request_move_warning.rb +335 -0
- data/lib/crisphive/models/job_request_period.rb +2 -2
- data/lib/crisphive/models/job_request_priority_update_result.rb +217 -0
- data/lib/crisphive/models/job_request_quote_request.rb +343 -0
- data/lib/crisphive/models/job_request_quote_summary.rb +2 -2
- data/lib/crisphive/models/job_request_rating_summary.rb +2 -2
- data/lib/crisphive/models/job_request_reassign_fallback.rb +287 -0
- data/lib/crisphive/models/job_request_reschedule_day.rb +227 -0
- data/lib/crisphive/models/job_request_reschedule_move.rb +319 -0
- data/lib/crisphive/models/job_request_reschedule_reassignment.rb +339 -0
- data/lib/crisphive/models/job_request_schedule.rb +2 -2
- data/lib/crisphive/models/job_request_session.rb +8 -7
- data/lib/crisphive/models/job_request_skill_summary.rb +3 -3
- data/lib/crisphive/models/job_request_status_summary.rb +3 -3
- data/lib/crisphive/models/job_request_tech_candidate.rb +287 -0
- data/lib/crisphive/models/job_request_technician_info.rb +2 -2
- data/lib/crisphive/models/job_request_time_segments.rb +287 -0
- data/lib/crisphive/models/job_request_time_segments_business_time.rb +321 -0
- data/lib/crisphive/models/job_request_time_segments_day.rb +247 -0
- data/lib/crisphive/models/job_request_time_segments_slot.rb +375 -0
- data/lib/crisphive/models/job_request_time_segments_worker.rb +295 -0
- data/lib/crisphive/models/job_request_timeline.rb +2 -2
- data/lib/crisphive/models/job_request_timeline_action.rb +2 -2
- data/lib/crisphive/models/job_request_timeline_event.rb +2 -2
- data/lib/crisphive/models/job_request_update_priority_request.rb +295 -0
- data/lib/crisphive/models/job_type.rb +44 -4
- data/lib/crisphive/models/job_type_create_request.rb +399 -0
- data/lib/crisphive/models/job_type_create_response.rb +215 -0
- data/lib/crisphive/models/job_type_update_request.rb +400 -0
- data/lib/crisphive/models/list_assignable_groups200_response.rb +255 -0
- data/lib/crisphive/models/list_crew_candidates200_response.rb +253 -0
- data/lib/crisphive/models/list_customers200_response.rb +5 -2
- data/lib/crisphive/models/list_emergency_candidates200_response.rb +253 -0
- data/lib/crisphive/models/list_job_request_booking_windows200_response.rb +5 -2
- data/lib/crisphive/models/list_job_request_changes200_response.rb +5 -2
- data/lib/crisphive/models/list_job_requests200_response.rb +5 -2
- data/lib/crisphive/models/list_job_types200_response.rb +5 -2
- data/lib/crisphive/models/list_matching_slots200_response.rb +253 -0
- data/lib/crisphive/models/list_nearby_technicians200_response.rb +253 -0
- data/lib/crisphive/models/list_service_areas200_response.rb +5 -2
- data/lib/crisphive/models/list_skill_categories200_response.rb +5 -2
- data/lib/crisphive/models/list_skills200_response.rb +5 -2
- data/lib/crisphive/models/list_skills_by_category200_response.rb +5 -2
- data/lib/crisphive/models/list_technician_skills200_response.rb +253 -0
- data/lib/crisphive/models/list_technician_time_off200_response.rb +253 -0
- data/lib/crisphive/models/list_technicians200_response.rb +5 -2
- data/lib/crisphive/models/list_vehicles200_response.rb +5 -2
- data/lib/crisphive/models/list_webhook_event_types200_response.rb +255 -0
- data/lib/crisphive/models/nearby_technician.rb +319 -0
- data/lib/crisphive/models/nearby_technicians.rb +237 -0
- data/lib/crisphive/models/pagination.rb +7 -2
- data/lib/crisphive/models/quote_job_request200_response.rb +253 -0
- data/lib/crisphive/models/replace_technician_service_areas200_response.rb +253 -0
- data/lib/crisphive/models/response_envelope.rb +6 -2
- data/lib/crisphive/models/service_area.rb +23 -3
- data/lib/crisphive/models/service_area_create_request.rb +455 -0
- data/lib/crisphive/models/service_area_create_response.rb +215 -0
- data/lib/crisphive/models/service_area_list.rb +2 -2
- data/lib/crisphive/models/service_area_update_request.rb +451 -0
- data/lib/crisphive/models/skill.rb +9 -2
- data/lib/crisphive/models/skill_by_category_list.rb +4 -2
- data/lib/crisphive/models/skill_category.rb +7 -2
- data/lib/crisphive/models/skill_category_create_request.rb +270 -0
- data/lib/crisphive/models/skill_category_create_response.rb +215 -0
- data/lib/crisphive/models/skill_category_list.rb +4 -2
- data/lib/crisphive/models/skill_create_request.rb +270 -0
- data/lib/crisphive/models/skill_create_response.rb +215 -0
- data/lib/crisphive/models/skill_list.rb +2 -2
- data/lib/crisphive/models/skill_summary.rb +2 -2
- data/lib/crisphive/models/skill_update_request.rb +281 -0
- data/lib/crisphive/models/technician.rb +66 -4
- data/lib/crisphive/models/technician_address.rb +2 -2
- data/lib/crisphive/models/technician_address_input.rb +408 -0
- data/lib/crisphive/models/technician_buddies_request.rb +236 -0
- data/lib/crisphive/models/technician_create_request.rb +603 -0
- data/lib/crisphive/models/technician_create_response.rb +215 -0
- data/lib/crisphive/models/technician_lead_ref.rb +2 -2
- data/lib/crisphive/models/technician_leads_request.rb +236 -0
- data/lib/crisphive/models/technician_list.rb +3 -3
- data/lib/crisphive/models/technician_schedule.rb +279 -0
- data/lib/crisphive/models/technician_schedule_block.rb +225 -0
- data/lib/crisphive/models/technician_schedule_session.rb +311 -0
- data/lib/crisphive/models/technician_service_area_ref.rb +2 -2
- data/lib/crisphive/models/technician_service_areas_request.rb +236 -0
- data/lib/crisphive/models/technician_service_areas_response.rb +217 -0
- data/lib/crisphive/models/technician_skill.rb +265 -0
- data/lib/crisphive/models/technician_skill_list.rb +227 -0
- data/lib/crisphive/models/technician_skills_request.rb +236 -0
- data/lib/crisphive/models/technician_status.rb +2 -2
- data/lib/crisphive/models/technician_time_off.rb +334 -0
- data/lib/crisphive/models/technician_time_off_create_request.rb +285 -0
- data/lib/crisphive/models/technician_time_off_create_response.rb +215 -0
- data/lib/crisphive/models/technician_time_off_list.rb +246 -0
- data/lib/crisphive/models/technician_update_request.rb +507 -0
- data/lib/crisphive/models/technician_vehicles_request.rb +236 -0
- data/lib/crisphive/models/vehicle.rb +26 -4
- data/lib/crisphive/models/vehicle_create_request.rb +420 -0
- data/lib/crisphive/models/vehicle_create_response.rb +215 -0
- data/lib/crisphive/models/vehicle_list.rb +2 -2
- data/lib/crisphive/models/vehicle_owner.rb +2 -2
- data/lib/crisphive/models/vehicle_update_request.rb +440 -0
- data/lib/crisphive/models/webhook_create_request.rb +320 -0
- data/lib/crisphive/models/webhook_create_response.rb +391 -0
- data/lib/crisphive/models/webhook_verification.rb +235 -0
- data/lib/crisphive/version.rb +3 -3
- data/lib/crisphive.rb +126 -2
- data/spec/spec_helper.rb +2 -2
- metadata +129 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Crisphive Developer API
|
|
3
3
|
|
|
4
|
-
#Public REST API for integrating
|
|
4
|
+
#Public REST API for integrating Crisphive from your own backend. Authenticate every request with a secret API key as a Bearer token (`Authorization: Bearer chsk_live_…`). The key prefix selects the data environment: `chsk_live_…` → production (live), `chsk_test_…` → sandbox (isolated test). **Key scopes (restricted keys).** A key is either *full-access* (can call every endpoint below) or *restricted* to a set of permission codes chosen at creation — the same codes as the dashboard permission grid (e.g. `customers_view`, `job_create`, `team_manage`). A restricted key calling an endpoint outside its scope gets `403`. The full code list is the permission catalog (`GET /permission/modules` on the dashboard API). Create, scope, and revoke keys from the business dashboard. Every response is wrapped in the envelope `{ \"error_code\": 0, \"message\": \"Success\", \"data\": <payload> }`.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
|
7
7
|
|
|
@@ -19,8 +19,282 @@ module Crisphive
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Create a skill
|
|
23
|
+
# Creates a skill under the given category. New skills are active by default. Skill names must be unique within their category.
|
|
24
|
+
# @param id [String] Skill category ID (UUID)
|
|
25
|
+
# @param skill_create_request [SkillCreateRequest] Skill details (name max 200 chars, description max 4000 chars)
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [String] :idempotency_key Unique key making retries safe: a repeat send with the same key replays the original response (header Idempotent-Replayed: true) instead of re-running the operation. Reusing a key with a different body returns 422 IDEMPOTENCY_KEY_REUSE.
|
|
28
|
+
# @return [CreateSkill200Response]
|
|
29
|
+
def create_skill(id, skill_create_request, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_skill_with_http_info(id, skill_create_request, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Create a skill
|
|
35
|
+
# Creates a skill under the given category. New skills are active by default. Skill names must be unique within their category.
|
|
36
|
+
# @param id [String] Skill category ID (UUID)
|
|
37
|
+
# @param skill_create_request [SkillCreateRequest] Skill details (name max 200 chars, description max 4000 chars)
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [String] :idempotency_key Unique key making retries safe: a repeat send with the same key replays the original response (header Idempotent-Replayed: true) instead of re-running the operation. Reusing a key with a different body returns 422 IDEMPOTENCY_KEY_REUSE.
|
|
40
|
+
# @return [Array<(CreateSkill200Response, Integer, Hash)>] CreateSkill200Response data, response status code and response headers
|
|
41
|
+
def create_skill_with_http_info(id, skill_create_request, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: BusinessSkillApi.create_skill ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'id' is set
|
|
46
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling BusinessSkillApi.create_skill"
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter 'skill_create_request' is set
|
|
50
|
+
if @api_client.config.client_side_validation && skill_create_request.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'skill_create_request' when calling BusinessSkillApi.create_skill"
|
|
52
|
+
end
|
|
53
|
+
# resource path
|
|
54
|
+
local_var_path = '/skill-categories/{id}/skills'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
55
|
+
|
|
56
|
+
# query parameters
|
|
57
|
+
query_params = opts[:query_params] || {}
|
|
58
|
+
|
|
59
|
+
# header parameters
|
|
60
|
+
header_params = opts[:header_params] || {}
|
|
61
|
+
# HTTP header 'Accept' (if needed)
|
|
62
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
63
|
+
# HTTP header 'Content-Type'
|
|
64
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
65
|
+
if !content_type.nil?
|
|
66
|
+
header_params['Content-Type'] = content_type
|
|
67
|
+
end
|
|
68
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
69
|
+
|
|
70
|
+
# form parameters
|
|
71
|
+
form_params = opts[:form_params] || {}
|
|
72
|
+
|
|
73
|
+
# http body (model)
|
|
74
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(skill_create_request)
|
|
75
|
+
|
|
76
|
+
# return_type
|
|
77
|
+
return_type = opts[:debug_return_type] || 'CreateSkill200Response'
|
|
78
|
+
|
|
79
|
+
# auth_names
|
|
80
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
81
|
+
|
|
82
|
+
new_options = opts.merge(
|
|
83
|
+
:operation => :"BusinessSkillApi.create_skill",
|
|
84
|
+
:header_params => header_params,
|
|
85
|
+
:query_params => query_params,
|
|
86
|
+
:form_params => form_params,
|
|
87
|
+
:body => post_body,
|
|
88
|
+
:auth_names => auth_names,
|
|
89
|
+
:return_type => return_type
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug "API called: BusinessSkillApi#create_skill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
95
|
+
end
|
|
96
|
+
return data, status_code, headers
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Create a skill category
|
|
100
|
+
# Creates a skill category for the current business. Categories group skills (e.g. \"Plumbing\", \"Electrical\"). Names must be unique within a business.
|
|
101
|
+
# @param skill_category_create_request [SkillCategoryCreateRequest] Category name (max 200 chars)
|
|
102
|
+
# @param [Hash] opts the optional parameters
|
|
103
|
+
# @option opts [String] :idempotency_key Unique key making retries safe: a repeat send with the same key replays the original response (header Idempotent-Replayed: true) instead of re-running the operation. Reusing a key with a different body returns 422 IDEMPOTENCY_KEY_REUSE.
|
|
104
|
+
# @return [CreateSkillCategory200Response]
|
|
105
|
+
def create_skill_category(skill_category_create_request, opts = {})
|
|
106
|
+
data, _status_code, _headers = create_skill_category_with_http_info(skill_category_create_request, opts)
|
|
107
|
+
data
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Create a skill category
|
|
111
|
+
# Creates a skill category for the current business. Categories group skills (e.g. \"Plumbing\", \"Electrical\"). Names must be unique within a business.
|
|
112
|
+
# @param skill_category_create_request [SkillCategoryCreateRequest] Category name (max 200 chars)
|
|
113
|
+
# @param [Hash] opts the optional parameters
|
|
114
|
+
# @option opts [String] :idempotency_key Unique key making retries safe: a repeat send with the same key replays the original response (header Idempotent-Replayed: true) instead of re-running the operation. Reusing a key with a different body returns 422 IDEMPOTENCY_KEY_REUSE.
|
|
115
|
+
# @return [Array<(CreateSkillCategory200Response, Integer, Hash)>] CreateSkillCategory200Response data, response status code and response headers
|
|
116
|
+
def create_skill_category_with_http_info(skill_category_create_request, opts = {})
|
|
117
|
+
if @api_client.config.debugging
|
|
118
|
+
@api_client.config.logger.debug 'Calling API: BusinessSkillApi.create_skill_category ...'
|
|
119
|
+
end
|
|
120
|
+
# verify the required parameter 'skill_category_create_request' is set
|
|
121
|
+
if @api_client.config.client_side_validation && skill_category_create_request.nil?
|
|
122
|
+
fail ArgumentError, "Missing the required parameter 'skill_category_create_request' when calling BusinessSkillApi.create_skill_category"
|
|
123
|
+
end
|
|
124
|
+
# resource path
|
|
125
|
+
local_var_path = '/skill-categories'
|
|
126
|
+
|
|
127
|
+
# query parameters
|
|
128
|
+
query_params = opts[:query_params] || {}
|
|
129
|
+
|
|
130
|
+
# header parameters
|
|
131
|
+
header_params = opts[:header_params] || {}
|
|
132
|
+
# HTTP header 'Accept' (if needed)
|
|
133
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
134
|
+
# HTTP header 'Content-Type'
|
|
135
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
136
|
+
if !content_type.nil?
|
|
137
|
+
header_params['Content-Type'] = content_type
|
|
138
|
+
end
|
|
139
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
140
|
+
|
|
141
|
+
# form parameters
|
|
142
|
+
form_params = opts[:form_params] || {}
|
|
143
|
+
|
|
144
|
+
# http body (model)
|
|
145
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(skill_category_create_request)
|
|
146
|
+
|
|
147
|
+
# return_type
|
|
148
|
+
return_type = opts[:debug_return_type] || 'CreateSkillCategory200Response'
|
|
149
|
+
|
|
150
|
+
# auth_names
|
|
151
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
152
|
+
|
|
153
|
+
new_options = opts.merge(
|
|
154
|
+
:operation => :"BusinessSkillApi.create_skill_category",
|
|
155
|
+
:header_params => header_params,
|
|
156
|
+
:query_params => query_params,
|
|
157
|
+
:form_params => form_params,
|
|
158
|
+
:body => post_body,
|
|
159
|
+
:auth_names => auth_names,
|
|
160
|
+
:return_type => return_type
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
164
|
+
if @api_client.config.debugging
|
|
165
|
+
@api_client.config.logger.debug "API called: BusinessSkillApi#create_skill_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
166
|
+
end
|
|
167
|
+
return data, status_code, headers
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Delete a skill
|
|
171
|
+
# Permanently deletes a skill. Returns SKILL_HAS_MEMBERS (409) if any active technicians are still assigned — unassign all technicians first.
|
|
172
|
+
# @param id [String] Skill ID (UUID)
|
|
173
|
+
# @param [Hash] opts the optional parameters
|
|
174
|
+
# @return [ResponseEnvelope]
|
|
175
|
+
def delete_skill(id, opts = {})
|
|
176
|
+
data, _status_code, _headers = delete_skill_with_http_info(id, opts)
|
|
177
|
+
data
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Delete a skill
|
|
181
|
+
# Permanently deletes a skill. Returns SKILL_HAS_MEMBERS (409) if any active technicians are still assigned — unassign all technicians first.
|
|
182
|
+
# @param id [String] Skill ID (UUID)
|
|
183
|
+
# @param [Hash] opts the optional parameters
|
|
184
|
+
# @return [Array<(ResponseEnvelope, Integer, Hash)>] ResponseEnvelope data, response status code and response headers
|
|
185
|
+
def delete_skill_with_http_info(id, opts = {})
|
|
186
|
+
if @api_client.config.debugging
|
|
187
|
+
@api_client.config.logger.debug 'Calling API: BusinessSkillApi.delete_skill ...'
|
|
188
|
+
end
|
|
189
|
+
# verify the required parameter 'id' is set
|
|
190
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
191
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling BusinessSkillApi.delete_skill"
|
|
192
|
+
end
|
|
193
|
+
# resource path
|
|
194
|
+
local_var_path = '/skills/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
195
|
+
|
|
196
|
+
# query parameters
|
|
197
|
+
query_params = opts[:query_params] || {}
|
|
198
|
+
|
|
199
|
+
# header parameters
|
|
200
|
+
header_params = opts[:header_params] || {}
|
|
201
|
+
# HTTP header 'Accept' (if needed)
|
|
202
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
203
|
+
|
|
204
|
+
# form parameters
|
|
205
|
+
form_params = opts[:form_params] || {}
|
|
206
|
+
|
|
207
|
+
# http body (model)
|
|
208
|
+
post_body = opts[:debug_body]
|
|
209
|
+
|
|
210
|
+
# return_type
|
|
211
|
+
return_type = opts[:debug_return_type] || 'ResponseEnvelope'
|
|
212
|
+
|
|
213
|
+
# auth_names
|
|
214
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
215
|
+
|
|
216
|
+
new_options = opts.merge(
|
|
217
|
+
:operation => :"BusinessSkillApi.delete_skill",
|
|
218
|
+
:header_params => header_params,
|
|
219
|
+
:query_params => query_params,
|
|
220
|
+
:form_params => form_params,
|
|
221
|
+
:body => post_body,
|
|
222
|
+
:auth_names => auth_names,
|
|
223
|
+
:return_type => return_type
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
227
|
+
if @api_client.config.debugging
|
|
228
|
+
@api_client.config.logger.debug "API called: BusinessSkillApi#delete_skill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
229
|
+
end
|
|
230
|
+
return data, status_code, headers
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Delete a skill category
|
|
234
|
+
# Permanently deletes a skill category. Returns SKILL_CATEGORY_NOT_EMPTY (409) if any skills still belong to the category — remove or move all skills first.
|
|
235
|
+
# @param id [String] Skill category ID (UUID)
|
|
236
|
+
# @param [Hash] opts the optional parameters
|
|
237
|
+
# @return [ResponseEnvelope]
|
|
238
|
+
def delete_skill_category(id, opts = {})
|
|
239
|
+
data, _status_code, _headers = delete_skill_category_with_http_info(id, opts)
|
|
240
|
+
data
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Delete a skill category
|
|
244
|
+
# Permanently deletes a skill category. Returns SKILL_CATEGORY_NOT_EMPTY (409) if any skills still belong to the category — remove or move all skills first.
|
|
245
|
+
# @param id [String] Skill category ID (UUID)
|
|
246
|
+
# @param [Hash] opts the optional parameters
|
|
247
|
+
# @return [Array<(ResponseEnvelope, Integer, Hash)>] ResponseEnvelope data, response status code and response headers
|
|
248
|
+
def delete_skill_category_with_http_info(id, opts = {})
|
|
249
|
+
if @api_client.config.debugging
|
|
250
|
+
@api_client.config.logger.debug 'Calling API: BusinessSkillApi.delete_skill_category ...'
|
|
251
|
+
end
|
|
252
|
+
# verify the required parameter 'id' is set
|
|
253
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
254
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling BusinessSkillApi.delete_skill_category"
|
|
255
|
+
end
|
|
256
|
+
# resource path
|
|
257
|
+
local_var_path = '/skill-categories/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
258
|
+
|
|
259
|
+
# query parameters
|
|
260
|
+
query_params = opts[:query_params] || {}
|
|
261
|
+
|
|
262
|
+
# header parameters
|
|
263
|
+
header_params = opts[:header_params] || {}
|
|
264
|
+
# HTTP header 'Accept' (if needed)
|
|
265
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
266
|
+
|
|
267
|
+
# form parameters
|
|
268
|
+
form_params = opts[:form_params] || {}
|
|
269
|
+
|
|
270
|
+
# http body (model)
|
|
271
|
+
post_body = opts[:debug_body]
|
|
272
|
+
|
|
273
|
+
# return_type
|
|
274
|
+
return_type = opts[:debug_return_type] || 'ResponseEnvelope'
|
|
275
|
+
|
|
276
|
+
# auth_names
|
|
277
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
278
|
+
|
|
279
|
+
new_options = opts.merge(
|
|
280
|
+
:operation => :"BusinessSkillApi.delete_skill_category",
|
|
281
|
+
:header_params => header_params,
|
|
282
|
+
:query_params => query_params,
|
|
283
|
+
:form_params => form_params,
|
|
284
|
+
:body => post_body,
|
|
285
|
+
:auth_names => auth_names,
|
|
286
|
+
:return_type => return_type
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
290
|
+
if @api_client.config.debugging
|
|
291
|
+
@api_client.config.logger.debug "API called: BusinessSkillApi#delete_skill_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
292
|
+
end
|
|
293
|
+
return data, status_code, headers
|
|
294
|
+
end
|
|
295
|
+
|
|
22
296
|
# List skill categories
|
|
23
|
-
# Returns paginated skill categories
|
|
297
|
+
# Returns paginated skill categories — how the business groups technician qualifications by trade or specialty (e.g. HVAC, plumbing, electrical) — ordered alphabetically.
|
|
24
298
|
# @param [Hash] opts the optional parameters
|
|
25
299
|
# @option opts [Integer] :page Page number (default: 1)
|
|
26
300
|
# @option opts [Integer] :limit Page size (default: 15, max: 1000)
|
|
@@ -31,7 +305,7 @@ module Crisphive
|
|
|
31
305
|
end
|
|
32
306
|
|
|
33
307
|
# List skill categories
|
|
34
|
-
# Returns paginated skill categories
|
|
308
|
+
# Returns paginated skill categories — how the business groups technician qualifications by trade or specialty (e.g. HVAC, plumbing, electrical) — ordered alphabetically.
|
|
35
309
|
# @param [Hash] opts the optional parameters
|
|
36
310
|
# @option opts [Integer] :page Page number (default: 1)
|
|
37
311
|
# @option opts [Integer] :limit Page size (default: 15, max: 1000)
|
|
@@ -83,7 +357,7 @@ module Crisphive
|
|
|
83
357
|
end
|
|
84
358
|
|
|
85
359
|
# List all skills
|
|
86
|
-
# Returns the flat list of all active skills for the current business
|
|
360
|
+
# Returns the flat list of all active technician skills / qualifications for the current business — the vocabulary the dispatch engine uses for skill-based matching when assigning technicians and crews. Use it to discover the skill UUIDs accepted in `skill_ids` when creating a job request. (For a category-grouped view, use GET /skill-categories and GET /skill-categories/{id}/skills.)
|
|
87
361
|
# @param [Hash] opts the optional parameters
|
|
88
362
|
# @return [ListSkills200Response]
|
|
89
363
|
def list_skills(opts = {})
|
|
@@ -92,7 +366,7 @@ module Crisphive
|
|
|
92
366
|
end
|
|
93
367
|
|
|
94
368
|
# List all skills
|
|
95
|
-
# Returns the flat list of all active skills for the current business
|
|
369
|
+
# Returns the flat list of all active technician skills / qualifications for the current business — the vocabulary the dispatch engine uses for skill-based matching when assigning technicians and crews. Use it to discover the skill UUIDs accepted in `skill_ids` when creating a job request. (For a category-grouped view, use GET /skill-categories and GET /skill-categories/{id}/skills.)
|
|
96
370
|
# @param [Hash] opts the optional parameters
|
|
97
371
|
# @return [Array<(ListSkills200Response, Integer, Hash)>] ListSkills200Response data, response status code and response headers
|
|
98
372
|
def list_skills_with_http_info(opts = {})
|
|
@@ -140,7 +414,7 @@ module Crisphive
|
|
|
140
414
|
end
|
|
141
415
|
|
|
142
416
|
# List skills in a category
|
|
143
|
-
# Returns paginated skills belonging to the given category, ordered alphabetically. The `members` field on each skill is the count of active technicians currently
|
|
417
|
+
# Returns paginated skills (technician qualifications/certifications) belonging to the given trade/specialty category, ordered alphabetically. The `members` field on each skill is the count of active technicians currently holding it — a quick capacity check per capability.
|
|
144
418
|
# @param id [String] Skill category ID (UUID)
|
|
145
419
|
# @param [Hash] opts the optional parameters
|
|
146
420
|
# @option opts [Integer] :page Page number (default: 1)
|
|
@@ -152,7 +426,7 @@ module Crisphive
|
|
|
152
426
|
end
|
|
153
427
|
|
|
154
428
|
# List skills in a category
|
|
155
|
-
# Returns paginated skills belonging to the given category, ordered alphabetically. The `members` field on each skill is the count of active technicians currently
|
|
429
|
+
# Returns paginated skills (technician qualifications/certifications) belonging to the given trade/specialty category, ordered alphabetically. The `members` field on each skill is the count of active technicians currently holding it — a quick capacity check per capability.
|
|
156
430
|
# @param id [String] Skill category ID (UUID)
|
|
157
431
|
# @param [Hash] opts the optional parameters
|
|
158
432
|
# @option opts [Integer] :page Page number (default: 1)
|
|
@@ -207,5 +481,225 @@ module Crisphive
|
|
|
207
481
|
end
|
|
208
482
|
return data, status_code, headers
|
|
209
483
|
end
|
|
484
|
+
|
|
485
|
+
# List skills for a technician
|
|
486
|
+
# Returns paginated skills assigned to the technician. By default (`eligible_only` omitted or `true`) only active skills are returned — pass `eligible_only=false` to include inactive skills.
|
|
487
|
+
# @param id [String] Technician ID — business_user_profiles.id (UUID)
|
|
488
|
+
# @param [Hash] opts the optional parameters
|
|
489
|
+
# @option opts [Boolean] :eligible_only true (default) = active skills only; false = all assigned skills including inactive
|
|
490
|
+
# @option opts [Integer] :page Page number (default: 1)
|
|
491
|
+
# @option opts [Integer] :limit Page size (default: 15, max: 1000)
|
|
492
|
+
# @return [ListTechnicianSkills200Response]
|
|
493
|
+
def list_technician_skills(id, opts = {})
|
|
494
|
+
data, _status_code, _headers = list_technician_skills_with_http_info(id, opts)
|
|
495
|
+
data
|
|
496
|
+
end
|
|
497
|
+
|
|
498
|
+
# List skills for a technician
|
|
499
|
+
# Returns paginated skills assigned to the technician. By default (`eligible_only` omitted or `true`) only active skills are returned — pass `eligible_only=false` to include inactive skills.
|
|
500
|
+
# @param id [String] Technician ID — business_user_profiles.id (UUID)
|
|
501
|
+
# @param [Hash] opts the optional parameters
|
|
502
|
+
# @option opts [Boolean] :eligible_only true (default) = active skills only; false = all assigned skills including inactive
|
|
503
|
+
# @option opts [Integer] :page Page number (default: 1)
|
|
504
|
+
# @option opts [Integer] :limit Page size (default: 15, max: 1000)
|
|
505
|
+
# @return [Array<(ListTechnicianSkills200Response, Integer, Hash)>] ListTechnicianSkills200Response data, response status code and response headers
|
|
506
|
+
def list_technician_skills_with_http_info(id, opts = {})
|
|
507
|
+
if @api_client.config.debugging
|
|
508
|
+
@api_client.config.logger.debug 'Calling API: BusinessSkillApi.list_technician_skills ...'
|
|
509
|
+
end
|
|
510
|
+
# verify the required parameter 'id' is set
|
|
511
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
512
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling BusinessSkillApi.list_technician_skills"
|
|
513
|
+
end
|
|
514
|
+
# resource path
|
|
515
|
+
local_var_path = '/technicians/{id}/skills'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
516
|
+
|
|
517
|
+
# query parameters
|
|
518
|
+
query_params = opts[:query_params] || {}
|
|
519
|
+
query_params[:'eligible_only'] = opts[:'eligible_only'] if !opts[:'eligible_only'].nil?
|
|
520
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
521
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
522
|
+
|
|
523
|
+
# header parameters
|
|
524
|
+
header_params = opts[:header_params] || {}
|
|
525
|
+
# HTTP header 'Accept' (if needed)
|
|
526
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
527
|
+
|
|
528
|
+
# form parameters
|
|
529
|
+
form_params = opts[:form_params] || {}
|
|
530
|
+
|
|
531
|
+
# http body (model)
|
|
532
|
+
post_body = opts[:debug_body]
|
|
533
|
+
|
|
534
|
+
# return_type
|
|
535
|
+
return_type = opts[:debug_return_type] || 'ListTechnicianSkills200Response'
|
|
536
|
+
|
|
537
|
+
# auth_names
|
|
538
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
539
|
+
|
|
540
|
+
new_options = opts.merge(
|
|
541
|
+
:operation => :"BusinessSkillApi.list_technician_skills",
|
|
542
|
+
:header_params => header_params,
|
|
543
|
+
:query_params => query_params,
|
|
544
|
+
:form_params => form_params,
|
|
545
|
+
:body => post_body,
|
|
546
|
+
:auth_names => auth_names,
|
|
547
|
+
:return_type => return_type
|
|
548
|
+
)
|
|
549
|
+
|
|
550
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
551
|
+
if @api_client.config.debugging
|
|
552
|
+
@api_client.config.logger.debug "API called: BusinessSkillApi#list_technician_skills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
553
|
+
end
|
|
554
|
+
return data, status_code, headers
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
# Replace a technician's skills
|
|
558
|
+
# Sets the technician's full skill set in one call (replace semantics): skills not in the list are removed, new ones added. Pass an empty list to clear all. All skills must be active and belong to the business — on SKILL_NOT_FOUND (404) the `data` field contains `{\"missing_ids\": [\"uuid\", ...]}`; on SKILL_INACTIVE (409) it contains `{\"inactive_ids\": [\"uuid\", ...]}`.
|
|
559
|
+
# @param id [String] Technician ID — business_user_profiles.id (UUID)
|
|
560
|
+
# @param technician_skills_request [TechnicianSkillsRequest] Full list of skill_ids (business_skills.id), 0–100 UUIDs
|
|
561
|
+
# @param [Hash] opts the optional parameters
|
|
562
|
+
# @return [ResponseEnvelope]
|
|
563
|
+
def replace_technician_skills(id, technician_skills_request, opts = {})
|
|
564
|
+
data, _status_code, _headers = replace_technician_skills_with_http_info(id, technician_skills_request, opts)
|
|
565
|
+
data
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
# Replace a technician's skills
|
|
569
|
+
# Sets the technician's full skill set in one call (replace semantics): skills not in the list are removed, new ones added. Pass an empty list to clear all. All skills must be active and belong to the business — on SKILL_NOT_FOUND (404) the `data` field contains `{\"missing_ids\": [\"uuid\", ...]}`; on SKILL_INACTIVE (409) it contains `{\"inactive_ids\": [\"uuid\", ...]}`.
|
|
570
|
+
# @param id [String] Technician ID — business_user_profiles.id (UUID)
|
|
571
|
+
# @param technician_skills_request [TechnicianSkillsRequest] Full list of skill_ids (business_skills.id), 0–100 UUIDs
|
|
572
|
+
# @param [Hash] opts the optional parameters
|
|
573
|
+
# @return [Array<(ResponseEnvelope, Integer, Hash)>] ResponseEnvelope data, response status code and response headers
|
|
574
|
+
def replace_technician_skills_with_http_info(id, technician_skills_request, opts = {})
|
|
575
|
+
if @api_client.config.debugging
|
|
576
|
+
@api_client.config.logger.debug 'Calling API: BusinessSkillApi.replace_technician_skills ...'
|
|
577
|
+
end
|
|
578
|
+
# verify the required parameter 'id' is set
|
|
579
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
580
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling BusinessSkillApi.replace_technician_skills"
|
|
581
|
+
end
|
|
582
|
+
# verify the required parameter 'technician_skills_request' is set
|
|
583
|
+
if @api_client.config.client_side_validation && technician_skills_request.nil?
|
|
584
|
+
fail ArgumentError, "Missing the required parameter 'technician_skills_request' when calling BusinessSkillApi.replace_technician_skills"
|
|
585
|
+
end
|
|
586
|
+
# resource path
|
|
587
|
+
local_var_path = '/technicians/{id}/skills'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
588
|
+
|
|
589
|
+
# query parameters
|
|
590
|
+
query_params = opts[:query_params] || {}
|
|
591
|
+
|
|
592
|
+
# header parameters
|
|
593
|
+
header_params = opts[:header_params] || {}
|
|
594
|
+
# HTTP header 'Accept' (if needed)
|
|
595
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
596
|
+
# HTTP header 'Content-Type'
|
|
597
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
598
|
+
if !content_type.nil?
|
|
599
|
+
header_params['Content-Type'] = content_type
|
|
600
|
+
end
|
|
601
|
+
|
|
602
|
+
# form parameters
|
|
603
|
+
form_params = opts[:form_params] || {}
|
|
604
|
+
|
|
605
|
+
# http body (model)
|
|
606
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(technician_skills_request)
|
|
607
|
+
|
|
608
|
+
# return_type
|
|
609
|
+
return_type = opts[:debug_return_type] || 'ResponseEnvelope'
|
|
610
|
+
|
|
611
|
+
# auth_names
|
|
612
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
613
|
+
|
|
614
|
+
new_options = opts.merge(
|
|
615
|
+
:operation => :"BusinessSkillApi.replace_technician_skills",
|
|
616
|
+
:header_params => header_params,
|
|
617
|
+
:query_params => query_params,
|
|
618
|
+
:form_params => form_params,
|
|
619
|
+
:body => post_body,
|
|
620
|
+
:auth_names => auth_names,
|
|
621
|
+
:return_type => return_type
|
|
622
|
+
)
|
|
623
|
+
|
|
624
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
625
|
+
if @api_client.config.debugging
|
|
626
|
+
@api_client.config.logger.debug "API called: BusinessSkillApi#replace_technician_skills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
627
|
+
end
|
|
628
|
+
return data, status_code, headers
|
|
629
|
+
end
|
|
630
|
+
|
|
631
|
+
# Update a skill
|
|
632
|
+
# Updates a skill's name, description, and/or active status. `is_active` is optional — omit the field entirely to keep the current value; send `false` to deactivate or `true` to reactivate. Deactivating a skill prevents new technician assignments but does not remove existing ones.
|
|
633
|
+
# @param id [String] Skill ID (UUID)
|
|
634
|
+
# @param skill_update_request [SkillUpdateRequest] Fields to update
|
|
635
|
+
# @param [Hash] opts the optional parameters
|
|
636
|
+
# @return [ResponseEnvelope]
|
|
637
|
+
def update_skill(id, skill_update_request, opts = {})
|
|
638
|
+
data, _status_code, _headers = update_skill_with_http_info(id, skill_update_request, opts)
|
|
639
|
+
data
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
# Update a skill
|
|
643
|
+
# Updates a skill's name, description, and/or active status. `is_active` is optional — omit the field entirely to keep the current value; send `false` to deactivate or `true` to reactivate. Deactivating a skill prevents new technician assignments but does not remove existing ones.
|
|
644
|
+
# @param id [String] Skill ID (UUID)
|
|
645
|
+
# @param skill_update_request [SkillUpdateRequest] Fields to update
|
|
646
|
+
# @param [Hash] opts the optional parameters
|
|
647
|
+
# @return [Array<(ResponseEnvelope, Integer, Hash)>] ResponseEnvelope data, response status code and response headers
|
|
648
|
+
def update_skill_with_http_info(id, skill_update_request, opts = {})
|
|
649
|
+
if @api_client.config.debugging
|
|
650
|
+
@api_client.config.logger.debug 'Calling API: BusinessSkillApi.update_skill ...'
|
|
651
|
+
end
|
|
652
|
+
# verify the required parameter 'id' is set
|
|
653
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
654
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling BusinessSkillApi.update_skill"
|
|
655
|
+
end
|
|
656
|
+
# verify the required parameter 'skill_update_request' is set
|
|
657
|
+
if @api_client.config.client_side_validation && skill_update_request.nil?
|
|
658
|
+
fail ArgumentError, "Missing the required parameter 'skill_update_request' when calling BusinessSkillApi.update_skill"
|
|
659
|
+
end
|
|
660
|
+
# resource path
|
|
661
|
+
local_var_path = '/skills/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
662
|
+
|
|
663
|
+
# query parameters
|
|
664
|
+
query_params = opts[:query_params] || {}
|
|
665
|
+
|
|
666
|
+
# header parameters
|
|
667
|
+
header_params = opts[:header_params] || {}
|
|
668
|
+
# HTTP header 'Accept' (if needed)
|
|
669
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
670
|
+
# HTTP header 'Content-Type'
|
|
671
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
672
|
+
if !content_type.nil?
|
|
673
|
+
header_params['Content-Type'] = content_type
|
|
674
|
+
end
|
|
675
|
+
|
|
676
|
+
# form parameters
|
|
677
|
+
form_params = opts[:form_params] || {}
|
|
678
|
+
|
|
679
|
+
# http body (model)
|
|
680
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(skill_update_request)
|
|
681
|
+
|
|
682
|
+
# return_type
|
|
683
|
+
return_type = opts[:debug_return_type] || 'ResponseEnvelope'
|
|
684
|
+
|
|
685
|
+
# auth_names
|
|
686
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
687
|
+
|
|
688
|
+
new_options = opts.merge(
|
|
689
|
+
:operation => :"BusinessSkillApi.update_skill",
|
|
690
|
+
:header_params => header_params,
|
|
691
|
+
:query_params => query_params,
|
|
692
|
+
:form_params => form_params,
|
|
693
|
+
:body => post_body,
|
|
694
|
+
:auth_names => auth_names,
|
|
695
|
+
:return_type => return_type
|
|
696
|
+
)
|
|
697
|
+
|
|
698
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
699
|
+
if @api_client.config.debugging
|
|
700
|
+
@api_client.config.logger.debug "API called: BusinessSkillApi#update_skill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
701
|
+
end
|
|
702
|
+
return data, status_code, headers
|
|
703
|
+
end
|
|
210
704
|
end
|
|
211
705
|
end
|