crisphive 0.2.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 +98 -10
- data/lib/crisphive/api/business_skill_api.rb +348 -0
- data/lib/crisphive/api/customer_api.rb +7 -4
- data/lib/crisphive/api/job_request_business_api.rb +243 -27
- data/lib/crisphive/api/job_types_api.rb +208 -0
- data/lib/crisphive/api/permission_api.rb +79 -0
- data/lib/crisphive/api/service_area_api.rb +208 -0
- data/lib/crisphive/api/technician_api.rb +8 -8
- data/lib/crisphive/api/technician_time_off_api.rb +240 -0
- data/lib/crisphive/api/vehicle_api.rb +208 -0
- data/lib/crisphive/api/webhooks_api.rb +213 -0
- 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/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_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 +11 -1
- data/lib/crisphive/models/customer_contact.rb +25 -5
- data/lib/crisphive/models/customer_create_request.rb +12 -2
- data/lib/crisphive/models/customer_list_item.rb +11 -1
- 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_technician_ref.rb +225 -0
- data/lib/crisphive/models/customer_update_request.rb +23 -20
- data/lib/crisphive/models/internal_jobrequest_http_address_req.rb +475 -0
- data/lib/crisphive/models/job_request.rb +11 -1
- 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_summary.rb +1 -1
- data/lib/crisphive/models/job_request_attention_summary.rb +2 -2
- 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_confirm_request.rb +14 -4
- data/lib/crisphive/models/job_request_create_request.rb +1 -1
- data/lib/crisphive/models/job_request_emergency_candidate.rb +26 -4
- data/lib/crisphive/models/job_request_emergency_candidates.rb +1 -1
- data/lib/crisphive/models/job_request_emergency_candidates_request.rb +24 -11
- data/lib/crisphive/models/job_request_emergency_commit_request.rb +11 -1
- data/lib/crisphive/models/job_request_emergency_inline_job.rb +353 -0
- data/lib/crisphive/models/job_request_emergency_plan.rb +25 -3
- data/lib/crisphive/models/job_request_emergency_preview_request.rb +24 -11
- data/lib/crisphive/models/job_request_move_commit_req.rb +11 -1
- data/lib/crisphive/models/job_request_move_plan.rb +11 -1
- data/lib/crisphive/models/job_request_move_preview_req.rb +11 -1
- data/lib/crisphive/models/job_request_move_warning.rb +32 -8
- data/lib/crisphive/models/job_request_priority_update_result.rb +217 -0
- data/lib/crisphive/models/job_request_quote_request.rb +14 -11
- data/lib/crisphive/models/job_request_reassign_fallback.rb +287 -0
- data/lib/crisphive/models/job_request_skill_summary.rb +1 -1
- data/lib/crisphive/models/job_request_status_summary.rb +1 -1
- data/lib/crisphive/models/job_request_time_segments.rb +2 -2
- data/lib/crisphive/models/job_type.rb +42 -2
- 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_technician_time_off200_response.rb +253 -0
- data/lib/crisphive/models/list_webhook_event_types200_response.rb +255 -0
- data/lib/crisphive/models/quote_job_request200_response.rb +253 -0
- data/lib/crisphive/models/service_area.rb +21 -1
- 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_update_request.rb +451 -0
- 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_create_request.rb +270 -0
- data/lib/crisphive/models/skill_create_response.rb +215 -0
- data/lib/crisphive/models/skill_update_request.rb +281 -0
- data/lib/crisphive/models/technician.rb +64 -2
- data/lib/crisphive/models/technician_create_request.rb +14 -11
- 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 +2 -2
- 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_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 +1 -1
- data/lib/crisphive.rb +66 -0
- metadata +68 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 903ac519c7797cf42f3772dcca0d80d45b2c01f692dac196265a6495db01d57d
|
|
4
|
+
data.tar.gz: 3702e48e53e57c10ab504d8b11749bd3bce796888b48707bdb33497029e8e148
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: acfcb7333f4745c46004d6594a0039930312f069afc547e8b81b9708639f315b28d9168cf96b6e55556d23e7fb488071065bd6e8ccd61c2d0adcd04d2f15d615
|
|
7
|
+
data.tar.gz: 84e1831c06fc7aa5010e72a839e0df4257c0140ad1a61047db95efa0d1d242253991786399d07e713d0400ba0c7bd8d2c3bf40a202aeef0cb69b95acba01f969
|
data/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Every response is wrapped in the envelope `{ \"error_code\": 0, \"message\": \"S
|
|
|
11
11
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
12
12
|
|
|
13
13
|
- API version: 1.0
|
|
14
|
-
- Package version: 0.
|
|
14
|
+
- Package version: 0.3.0
|
|
15
15
|
- Generator version: 7.11.0
|
|
16
16
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
17
17
|
|
|
@@ -28,16 +28,16 @@ gem build crisphive.gemspec
|
|
|
28
28
|
Then either install the gem locally:
|
|
29
29
|
|
|
30
30
|
```shell
|
|
31
|
-
gem install ./crisphive-0.
|
|
31
|
+
gem install ./crisphive-0.3.0.gem
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
(for development, run `gem install --dev ./crisphive-0.
|
|
34
|
+
(for development, run `gem install --dev ./crisphive-0.3.0.gem` to install the development dependencies)
|
|
35
35
|
|
|
36
36
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
37
37
|
|
|
38
38
|
Finally add this to the Gemfile:
|
|
39
39
|
|
|
40
|
-
gem 'crisphive', '~> 0.
|
|
40
|
+
gem 'crisphive', '~> 0.3.0'
|
|
41
41
|
|
|
42
42
|
### Install from Git
|
|
43
43
|
|
|
@@ -72,17 +72,18 @@ Crisphive.configure do |config|
|
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
api_instance = Crisphive::BusinessSkillApi.new
|
|
75
|
+
id = 'id_example' # String | Skill category ID (UUID)
|
|
76
|
+
skill_create_request = Crisphive::SkillCreateRequest.new({name: 'Pipe Repair'}) # SkillCreateRequest | Skill details (name max 200 chars, description max 4000 chars)
|
|
75
77
|
opts = {
|
|
76
|
-
|
|
77
|
-
limit: 56 # Integer | Page size (default: 15, max: 1000)
|
|
78
|
+
idempotency_key: 'idempotency_key_example' # String | 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.
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
begin
|
|
81
|
-
#
|
|
82
|
-
result = api_instance.
|
|
82
|
+
#Create a skill
|
|
83
|
+
result = api_instance.create_skill(id, skill_create_request, opts)
|
|
83
84
|
p result
|
|
84
85
|
rescue Crisphive::ApiError => e
|
|
85
|
-
puts "Exception when calling BusinessSkillApi->
|
|
86
|
+
puts "Exception when calling BusinessSkillApi->create_skill: #{e}"
|
|
86
87
|
end
|
|
87
88
|
|
|
88
89
|
```
|
|
@@ -93,16 +94,23 @@ All URIs are relative to *https://api.crisphive.com/v1*
|
|
|
93
94
|
|
|
94
95
|
Class | Method | HTTP request | Description
|
|
95
96
|
------------ | ------------- | ------------- | -------------
|
|
97
|
+
*Crisphive::BusinessSkillApi* | [**create_skill**](docs/BusinessSkillApi.md#create_skill) | **POST** /skill-categories/{id}/skills | Create a skill
|
|
98
|
+
*Crisphive::BusinessSkillApi* | [**create_skill_category**](docs/BusinessSkillApi.md#create_skill_category) | **POST** /skill-categories | Create a skill category
|
|
99
|
+
*Crisphive::BusinessSkillApi* | [**delete_skill**](docs/BusinessSkillApi.md#delete_skill) | **DELETE** /skills/{id} | Delete a skill
|
|
100
|
+
*Crisphive::BusinessSkillApi* | [**delete_skill_category**](docs/BusinessSkillApi.md#delete_skill_category) | **DELETE** /skill-categories/{id} | Delete a skill category
|
|
96
101
|
*Crisphive::BusinessSkillApi* | [**list_skill_categories**](docs/BusinessSkillApi.md#list_skill_categories) | **GET** /skill-categories | List skill categories
|
|
97
102
|
*Crisphive::BusinessSkillApi* | [**list_skills**](docs/BusinessSkillApi.md#list_skills) | **GET** /skills | List all skills
|
|
98
103
|
*Crisphive::BusinessSkillApi* | [**list_skills_by_category**](docs/BusinessSkillApi.md#list_skills_by_category) | **GET** /skill-categories/{id}/skills | List skills in a category
|
|
99
104
|
*Crisphive::BusinessSkillApi* | [**list_technician_skills**](docs/BusinessSkillApi.md#list_technician_skills) | **GET** /technicians/{id}/skills | List skills for a technician
|
|
100
105
|
*Crisphive::BusinessSkillApi* | [**replace_technician_skills**](docs/BusinessSkillApi.md#replace_technician_skills) | **PATCH** /technicians/{id}/skills | Replace a technician's skills
|
|
106
|
+
*Crisphive::BusinessSkillApi* | [**update_skill**](docs/BusinessSkillApi.md#update_skill) | **PUT** /skills/{id} | Update a skill
|
|
101
107
|
*Crisphive::CustomerApi* | [**create_customer**](docs/CustomerApi.md#create_customer) | **POST** /customers | Create a customer
|
|
102
108
|
*Crisphive::CustomerApi* | [**delete_customer**](docs/CustomerApi.md#delete_customer) | **DELETE** /customers/{id} | Delete a customer
|
|
103
109
|
*Crisphive::CustomerApi* | [**get_customer**](docs/CustomerApi.md#get_customer) | **GET** /customers/{id} | Get a customer
|
|
104
110
|
*Crisphive::CustomerApi* | [**list_customers**](docs/CustomerApi.md#list_customers) | **GET** /customers | List customers
|
|
105
111
|
*Crisphive::CustomerApi* | [**update_customer**](docs/CustomerApi.md#update_customer) | **PUT** /customers/{id} | Update a customer
|
|
112
|
+
*Crisphive::JobRequestBusinessApi* | [**book_and_confirm_job_request**](docs/JobRequestBusinessApi.md#book_and_confirm_job_request) | **POST** /job-requests/book-and-confirm | Book, schedule and confirm a job in one call
|
|
113
|
+
*Crisphive::JobRequestBusinessApi* | [**commit_absence_resolve**](docs/JobRequestBusinessApi.md#commit_absence_resolve) | **POST** /job-requests/absence/commit | Commit the previewed re-staffing of a technician's day
|
|
106
114
|
*Crisphive::JobRequestBusinessApi* | [**commit_emergency_reschedule**](docs/JobRequestBusinessApi.md#commit_emergency_reschedule) | **POST** /job-requests/emergency/commit | Commit emergency insert + cascade reschedule
|
|
107
115
|
*Crisphive::JobRequestBusinessApi* | [**commit_job_request_move**](docs/JobRequestBusinessApi.md#commit_job_request_move) | **POST** /job-requests/{id}/move/commit | Commit a schedule-board job move
|
|
108
116
|
*Crisphive::JobRequestBusinessApi* | [**confirm_job_request**](docs/JobRequestBusinessApi.md#confirm_job_request) | **POST** /job-requests/{id}/confirm | Confirm a booking on behalf of the customer
|
|
@@ -117,16 +125,24 @@ Class | Method | HTTP request | Description
|
|
|
117
125
|
*Crisphive::JobRequestBusinessApi* | [**list_job_requests**](docs/JobRequestBusinessApi.md#list_job_requests) | **GET** /job-requests | List job requests
|
|
118
126
|
*Crisphive::JobRequestBusinessApi* | [**list_matching_slots**](docs/JobRequestBusinessApi.md#list_matching_slots) | **GET** /job-requests/{id}/time-segments | Matching time slots for a quoted job
|
|
119
127
|
*Crisphive::JobRequestBusinessApi* | [**list_nearby_technicians**](docs/JobRequestBusinessApi.md#list_nearby_technicians) | **GET** /technicians/nearby | Find nearby feasible technicians (job-less location query)
|
|
128
|
+
*Crisphive::JobRequestBusinessApi* | [**preview_absence_resolve**](docs/JobRequestBusinessApi.md#preview_absence_resolve) | **POST** /job-requests/absence/preview | Preview re-staffing a technician's whole day (sick call)
|
|
120
129
|
*Crisphive::JobRequestBusinessApi* | [**preview_emergency_reschedule**](docs/JobRequestBusinessApi.md#preview_emergency_reschedule) | **POST** /job-requests/emergency/preview | Preview emergency insert + cascade reschedule
|
|
121
130
|
*Crisphive::JobRequestBusinessApi* | [**preview_job_request_move**](docs/JobRequestBusinessApi.md#preview_job_request_move) | **POST** /job-requests/{id}/move/preview | Preview a schedule-board job move
|
|
122
131
|
*Crisphive::JobRequestBusinessApi* | [**quote_job_request**](docs/JobRequestBusinessApi.md#quote_job_request) | **POST** /job-requests/{id}/quote | Fire quote (FIXED action — business)
|
|
123
132
|
*Crisphive::JobRequestBusinessApi* | [**update_job_priority**](docs/JobRequestBusinessApi.md#update_job_priority) | **PATCH** /job-requests/{id}/priority | Set job priority (scheduling staff)
|
|
133
|
+
*Crisphive::JobTypesApi* | [**create_job_type**](docs/JobTypesApi.md#create_job_type) | **POST** /job-types | Add a job type to the catalog
|
|
134
|
+
*Crisphive::JobTypesApi* | [**delete_job_type**](docs/JobTypesApi.md#delete_job_type) | **DELETE** /job-types/{id} | Remove a job type from the catalog
|
|
124
135
|
*Crisphive::JobTypesApi* | [**get_job_type**](docs/JobTypesApi.md#get_job_type) | **GET** /job-types/{id} | Get a job type
|
|
125
136
|
*Crisphive::JobTypesApi* | [**list_job_types**](docs/JobTypesApi.md#list_job_types) | **GET** /job-types | List job types
|
|
137
|
+
*Crisphive::JobTypesApi* | [**update_job_type**](docs/JobTypesApi.md#update_job_type) | **PUT** /job-types/{id} | Rename a job type or change its availability
|
|
138
|
+
*Crisphive::PermissionApi* | [**list_assignable_groups**](docs/PermissionApi.md#list_assignable_groups) | **GET** /permission/groups/assignable | List groups the caller may assign to a member
|
|
139
|
+
*Crisphive::ServiceAreaApi* | [**create_service_area**](docs/ServiceAreaApi.md#create_service_area) | **POST** /service-areas | Define a territory the business serves
|
|
140
|
+
*Crisphive::ServiceAreaApi* | [**delete_service_area**](docs/ServiceAreaApi.md#delete_service_area) | **DELETE** /service-areas/{id} | Stop serving a territory
|
|
126
141
|
*Crisphive::ServiceAreaApi* | [**get_service_area**](docs/ServiceAreaApi.md#get_service_area) | **GET** /service-areas/{id} | Get a service area
|
|
127
142
|
*Crisphive::ServiceAreaApi* | [**list_service_areas**](docs/ServiceAreaApi.md#list_service_areas) | **GET** /service-areas | List service areas
|
|
143
|
+
*Crisphive::ServiceAreaApi* | [**update_service_area**](docs/ServiceAreaApi.md#update_service_area) | **PUT** /service-areas/{id} | Adjust a territory's details or its boundary
|
|
128
144
|
*Crisphive::TechnicianApi* | [**create_technician**](docs/TechnicianApi.md#create_technician) | **POST** /technicians | Add a technician
|
|
129
|
-
*Crisphive::TechnicianApi* | [**delete_technician**](docs/TechnicianApi.md#delete_technician) | **DELETE** /technicians/{id} | Remove a technician
|
|
145
|
+
*Crisphive::TechnicianApi* | [**delete_technician**](docs/TechnicianApi.md#delete_technician) | **DELETE** /technicians/{id} | Remove a technician from the business
|
|
130
146
|
*Crisphive::TechnicianApi* | [**get_technician**](docs/TechnicianApi.md#get_technician) | **GET** /technicians/{id} | Get a technician
|
|
131
147
|
*Crisphive::TechnicianApi* | [**list_technicians**](docs/TechnicianApi.md#list_technicians) | **GET** /technicians | List technicians
|
|
132
148
|
*Crisphive::TechnicianApi* | [**replace_technician_buddies**](docs/TechnicianApi.md#replace_technician_buddies) | **PUT** /technicians/{id}/buddies | Replace a technician's buddies
|
|
@@ -134,17 +150,38 @@ Class | Method | HTTP request | Description
|
|
|
134
150
|
*Crisphive::TechnicianApi* | [**replace_technician_service_areas**](docs/TechnicianApi.md#replace_technician_service_areas) | **PUT** /technicians/{id}/service-areas | Replace a technician's service areas
|
|
135
151
|
*Crisphive::TechnicianApi* | [**replace_technician_vehicles**](docs/TechnicianApi.md#replace_technician_vehicles) | **PUT** /technicians/{id}/vehicles | Replace a technician's vehicles
|
|
136
152
|
*Crisphive::TechnicianApi* | [**update_technician**](docs/TechnicianApi.md#update_technician) | **PUT** /technicians/{id} | Update a technician
|
|
153
|
+
*Crisphive::TechnicianTimeOffApi* | [**create_technician_time_off**](docs/TechnicianTimeOffApi.md#create_technician_time_off) | **POST** /technician-time-off | Record a technician's time off (sick day, leave)
|
|
154
|
+
*Crisphive::TechnicianTimeOffApi* | [**delete_technician_time_off**](docs/TechnicianTimeOffApi.md#delete_technician_time_off) | **DELETE** /technician-time-off/{id} | Delete a technician's time off (e.g. back from a sick day)
|
|
155
|
+
*Crisphive::TechnicianTimeOffApi* | [**list_technician_time_off**](docs/TechnicianTimeOffApi.md#list_technician_time_off) | **GET** /technicians/{id}/time-off | List time off for a specific technician
|
|
156
|
+
*Crisphive::VehicleApi* | [**create_vehicle**](docs/VehicleApi.md#create_vehicle) | **POST** /vehicles | Add a vehicle to the fleet
|
|
157
|
+
*Crisphive::VehicleApi* | [**delete_vehicle**](docs/VehicleApi.md#delete_vehicle) | **DELETE** /vehicles/{id} | Retire a vehicle from the fleet
|
|
137
158
|
*Crisphive::VehicleApi* | [**get_vehicle**](docs/VehicleApi.md#get_vehicle) | **GET** /vehicles/{id} | Get a vehicle
|
|
138
159
|
*Crisphive::VehicleApi* | [**list_vehicles**](docs/VehicleApi.md#list_vehicles) | **GET** /vehicles | List vehicles
|
|
160
|
+
*Crisphive::VehicleApi* | [**update_vehicle**](docs/VehicleApi.md#update_vehicle) | **PUT** /vehicles/{id} | Change a vehicle's details
|
|
161
|
+
*Crisphive::WebhooksApi* | [**create_webhook_endpoint**](docs/WebhooksApi.md#create_webhook_endpoint) | **POST** /webhooks | Create a webhook endpoint
|
|
162
|
+
*Crisphive::WebhooksApi* | [**delete_webhook_endpoint**](docs/WebhooksApi.md#delete_webhook_endpoint) | **DELETE** /webhooks/{id} | Delete a webhook endpoint
|
|
163
|
+
*Crisphive::WebhooksApi* | [**list_webhook_event_types**](docs/WebhooksApi.md#list_webhook_event_types) | **GET** /webhooks/event-types | List subscribable webhook event types
|
|
139
164
|
|
|
140
165
|
|
|
141
166
|
## Documentation for Models
|
|
142
167
|
|
|
168
|
+
- [Crisphive::ApiInternalTechtimeoffActions](docs/ApiInternalTechtimeoffActions.md)
|
|
169
|
+
- [Crisphive::ApiInternalTechtimeoffStatus](docs/ApiInternalTechtimeoffStatus.md)
|
|
170
|
+
- [Crisphive::AssignableGroup](docs/AssignableGroup.md)
|
|
171
|
+
- [Crisphive::BookAndConfirmJobRequest200Response](docs/BookAndConfirmJobRequest200Response.md)
|
|
172
|
+
- [Crisphive::CommitAbsenceResolve200Response](docs/CommitAbsenceResolve200Response.md)
|
|
143
173
|
- [Crisphive::CommitEmergencyReschedule200Response](docs/CommitEmergencyReschedule200Response.md)
|
|
144
174
|
- [Crisphive::CommitJobRequestMove200Response](docs/CommitJobRequestMove200Response.md)
|
|
145
175
|
- [Crisphive::CreateCustomer200Response](docs/CreateCustomer200Response.md)
|
|
146
176
|
- [Crisphive::CreateJobRequest200Response](docs/CreateJobRequest200Response.md)
|
|
177
|
+
- [Crisphive::CreateJobType200Response](docs/CreateJobType200Response.md)
|
|
178
|
+
- [Crisphive::CreateServiceArea200Response](docs/CreateServiceArea200Response.md)
|
|
179
|
+
- [Crisphive::CreateSkill200Response](docs/CreateSkill200Response.md)
|
|
180
|
+
- [Crisphive::CreateSkillCategory200Response](docs/CreateSkillCategory200Response.md)
|
|
147
181
|
- [Crisphive::CreateTechnician200Response](docs/CreateTechnician200Response.md)
|
|
182
|
+
- [Crisphive::CreateTechnicianTimeOff200Response](docs/CreateTechnicianTimeOff200Response.md)
|
|
183
|
+
- [Crisphive::CreateVehicle200Response](docs/CreateVehicle200Response.md)
|
|
184
|
+
- [Crisphive::CreateWebhookEndpoint200Response](docs/CreateWebhookEndpoint200Response.md)
|
|
148
185
|
- [Crisphive::Customer](docs/Customer.md)
|
|
149
186
|
- [Crisphive::CustomerAddress](docs/CustomerAddress.md)
|
|
150
187
|
- [Crisphive::CustomerAddressRequest](docs/CustomerAddressRequest.md)
|
|
@@ -154,7 +191,10 @@ Class | Method | HTTP request | Description
|
|
|
154
191
|
- [Crisphive::CustomerList](docs/CustomerList.md)
|
|
155
192
|
- [Crisphive::CustomerListItem](docs/CustomerListItem.md)
|
|
156
193
|
- [Crisphive::CustomerProfile](docs/CustomerProfile.md)
|
|
194
|
+
- [Crisphive::CustomerQuickBooksLink](docs/CustomerQuickBooksLink.md)
|
|
195
|
+
- [Crisphive::CustomerServiceAreaRef](docs/CustomerServiceAreaRef.md)
|
|
157
196
|
- [Crisphive::CustomerSpending](docs/CustomerSpending.md)
|
|
197
|
+
- [Crisphive::CustomerTechnicianRef](docs/CustomerTechnicianRef.md)
|
|
158
198
|
- [Crisphive::CustomerTierProgress](docs/CustomerTierProgress.md)
|
|
159
199
|
- [Crisphive::CustomerUpdateRequest](docs/CustomerUpdateRequest.md)
|
|
160
200
|
- [Crisphive::GetCustomer200Response](docs/GetCustomer200Response.md)
|
|
@@ -165,11 +205,23 @@ Class | Method | HTTP request | Description
|
|
|
165
205
|
- [Crisphive::GetTechnician200Response](docs/GetTechnician200Response.md)
|
|
166
206
|
- [Crisphive::GetTechnicianSchedule200Response](docs/GetTechnicianSchedule200Response.md)
|
|
167
207
|
- [Crisphive::GetVehicle200Response](docs/GetVehicle200Response.md)
|
|
208
|
+
- [Crisphive::InternalJobrequestHttpAddressReq](docs/InternalJobrequestHttpAddressReq.md)
|
|
168
209
|
- [Crisphive::JobDate](docs/JobDate.md)
|
|
169
210
|
- [Crisphive::JobDateBusinessRange](docs/JobDateBusinessRange.md)
|
|
170
211
|
- [Crisphive::JobDatePeriod](docs/JobDatePeriod.md)
|
|
171
212
|
- [Crisphive::JobDatePeriodEntry](docs/JobDatePeriodEntry.md)
|
|
172
213
|
- [Crisphive::JobRequest](docs/JobRequest.md)
|
|
214
|
+
- [Crisphive::JobRequestAbsenceAlternative](docs/JobRequestAbsenceAlternative.md)
|
|
215
|
+
- [Crisphive::JobRequestAbsenceAlternativeCost](docs/JobRequestAbsenceAlternativeCost.md)
|
|
216
|
+
- [Crisphive::JobRequestAbsenceAssignment](docs/JobRequestAbsenceAssignment.md)
|
|
217
|
+
- [Crisphive::JobRequestAbsenceCommitRequest](docs/JobRequestAbsenceCommitRequest.md)
|
|
218
|
+
- [Crisphive::JobRequestAbsenceNotification](docs/JobRequestAbsenceNotification.md)
|
|
219
|
+
- [Crisphive::JobRequestAbsencePlan](docs/JobRequestAbsencePlan.md)
|
|
220
|
+
- [Crisphive::JobRequestAbsencePreviewRequest](docs/JobRequestAbsencePreviewRequest.md)
|
|
221
|
+
- [Crisphive::JobRequestAbsenceResolvedJob](docs/JobRequestAbsenceResolvedJob.md)
|
|
222
|
+
- [Crisphive::JobRequestAbsenceSolver](docs/JobRequestAbsenceSolver.md)
|
|
223
|
+
- [Crisphive::JobRequestAbsenceTimeOff](docs/JobRequestAbsenceTimeOff.md)
|
|
224
|
+
- [Crisphive::JobRequestAbsenceUnresolvedJob](docs/JobRequestAbsenceUnresolvedJob.md)
|
|
173
225
|
- [Crisphive::JobRequestActionAuditBy](docs/JobRequestActionAuditBy.md)
|
|
174
226
|
- [Crisphive::JobRequestActionAuditEntry](docs/JobRequestActionAuditEntry.md)
|
|
175
227
|
- [Crisphive::JobRequestActionSummary](docs/JobRequestActionSummary.md)
|
|
@@ -180,6 +232,14 @@ Class | Method | HTTP request | Description
|
|
|
180
232
|
- [Crisphive::JobRequestAssignmentSummary](docs/JobRequestAssignmentSummary.md)
|
|
181
233
|
- [Crisphive::JobRequestAttentionSummary](docs/JobRequestAttentionSummary.md)
|
|
182
234
|
- [Crisphive::JobRequestAvailableVehicle](docs/JobRequestAvailableVehicle.md)
|
|
235
|
+
- [Crisphive::JobRequestBlocker](docs/JobRequestBlocker.md)
|
|
236
|
+
- [Crisphive::JobRequestBlockerRef](docs/JobRequestBlockerRef.md)
|
|
237
|
+
- [Crisphive::JobRequestBookAndConfirmCustomer](docs/JobRequestBookAndConfirmCustomer.md)
|
|
238
|
+
- [Crisphive::JobRequestBookAndConfirmEmergency](docs/JobRequestBookAndConfirmEmergency.md)
|
|
239
|
+
- [Crisphive::JobRequestBookAndConfirmEmergencyResult](docs/JobRequestBookAndConfirmEmergencyResult.md)
|
|
240
|
+
- [Crisphive::JobRequestBookAndConfirmRefusal](docs/JobRequestBookAndConfirmRefusal.md)
|
|
241
|
+
- [Crisphive::JobRequestBookAndConfirmRequest](docs/JobRequestBookAndConfirmRequest.md)
|
|
242
|
+
- [Crisphive::JobRequestBookAndConfirmResponse](docs/JobRequestBookAndConfirmResponse.md)
|
|
183
243
|
- [Crisphive::JobRequestBookingWindows](docs/JobRequestBookingWindows.md)
|
|
184
244
|
- [Crisphive::JobRequestBuddySlotCandidates](docs/JobRequestBuddySlotCandidates.md)
|
|
185
245
|
- [Crisphive::JobRequestBusinessTimeRange](docs/JobRequestBusinessTimeRange.md)
|
|
@@ -198,6 +258,7 @@ Class | Method | HTTP request | Description
|
|
|
198
258
|
- [Crisphive::JobRequestEmergencyCandidates](docs/JobRequestEmergencyCandidates.md)
|
|
199
259
|
- [Crisphive::JobRequestEmergencyCandidatesRequest](docs/JobRequestEmergencyCandidatesRequest.md)
|
|
200
260
|
- [Crisphive::JobRequestEmergencyCommitRequest](docs/JobRequestEmergencyCommitRequest.md)
|
|
261
|
+
- [Crisphive::JobRequestEmergencyInlineJob](docs/JobRequestEmergencyInlineJob.md)
|
|
201
262
|
- [Crisphive::JobRequestEmergencyPlan](docs/JobRequestEmergencyPlan.md)
|
|
202
263
|
- [Crisphive::JobRequestEmergencyPreviewRequest](docs/JobRequestEmergencyPreviewRequest.md)
|
|
203
264
|
- [Crisphive::JobRequestJobDateBusinessRangeRequest](docs/JobRequestJobDateBusinessRangeRequest.md)
|
|
@@ -211,9 +272,11 @@ Class | Method | HTTP request | Description
|
|
|
211
272
|
- [Crisphive::JobRequestMovePreviewReq](docs/JobRequestMovePreviewReq.md)
|
|
212
273
|
- [Crisphive::JobRequestMoveWarning](docs/JobRequestMoveWarning.md)
|
|
213
274
|
- [Crisphive::JobRequestPeriod](docs/JobRequestPeriod.md)
|
|
275
|
+
- [Crisphive::JobRequestPriorityUpdateResult](docs/JobRequestPriorityUpdateResult.md)
|
|
214
276
|
- [Crisphive::JobRequestQuoteRequest](docs/JobRequestQuoteRequest.md)
|
|
215
277
|
- [Crisphive::JobRequestQuoteSummary](docs/JobRequestQuoteSummary.md)
|
|
216
278
|
- [Crisphive::JobRequestRatingSummary](docs/JobRequestRatingSummary.md)
|
|
279
|
+
- [Crisphive::JobRequestReassignFallback](docs/JobRequestReassignFallback.md)
|
|
217
280
|
- [Crisphive::JobRequestRescheduleDay](docs/JobRequestRescheduleDay.md)
|
|
218
281
|
- [Crisphive::JobRequestRescheduleMove](docs/JobRequestRescheduleMove.md)
|
|
219
282
|
- [Crisphive::JobRequestRescheduleReassignment](docs/JobRequestRescheduleReassignment.md)
|
|
@@ -233,6 +296,10 @@ Class | Method | HTTP request | Description
|
|
|
233
296
|
- [Crisphive::JobRequestTimelineEvent](docs/JobRequestTimelineEvent.md)
|
|
234
297
|
- [Crisphive::JobRequestUpdatePriorityRequest](docs/JobRequestUpdatePriorityRequest.md)
|
|
235
298
|
- [Crisphive::JobType](docs/JobType.md)
|
|
299
|
+
- [Crisphive::JobTypeCreateRequest](docs/JobTypeCreateRequest.md)
|
|
300
|
+
- [Crisphive::JobTypeCreateResponse](docs/JobTypeCreateResponse.md)
|
|
301
|
+
- [Crisphive::JobTypeUpdateRequest](docs/JobTypeUpdateRequest.md)
|
|
302
|
+
- [Crisphive::ListAssignableGroups200Response](docs/ListAssignableGroups200Response.md)
|
|
236
303
|
- [Crisphive::ListCrewCandidates200Response](docs/ListCrewCandidates200Response.md)
|
|
237
304
|
- [Crisphive::ListCustomers200Response](docs/ListCustomers200Response.md)
|
|
238
305
|
- [Crisphive::ListEmergencyCandidates200Response](docs/ListEmergencyCandidates200Response.md)
|
|
@@ -247,21 +314,32 @@ Class | Method | HTTP request | Description
|
|
|
247
314
|
- [Crisphive::ListSkills200Response](docs/ListSkills200Response.md)
|
|
248
315
|
- [Crisphive::ListSkillsByCategory200Response](docs/ListSkillsByCategory200Response.md)
|
|
249
316
|
- [Crisphive::ListTechnicianSkills200Response](docs/ListTechnicianSkills200Response.md)
|
|
317
|
+
- [Crisphive::ListTechnicianTimeOff200Response](docs/ListTechnicianTimeOff200Response.md)
|
|
250
318
|
- [Crisphive::ListTechnicians200Response](docs/ListTechnicians200Response.md)
|
|
251
319
|
- [Crisphive::ListVehicles200Response](docs/ListVehicles200Response.md)
|
|
320
|
+
- [Crisphive::ListWebhookEventTypes200Response](docs/ListWebhookEventTypes200Response.md)
|
|
252
321
|
- [Crisphive::NearbyTechnician](docs/NearbyTechnician.md)
|
|
253
322
|
- [Crisphive::NearbyTechnicians](docs/NearbyTechnicians.md)
|
|
254
323
|
- [Crisphive::Pagination](docs/Pagination.md)
|
|
324
|
+
- [Crisphive::QuoteJobRequest200Response](docs/QuoteJobRequest200Response.md)
|
|
255
325
|
- [Crisphive::ReplaceTechnicianServiceAreas200Response](docs/ReplaceTechnicianServiceAreas200Response.md)
|
|
256
326
|
- [Crisphive::ResponseEnvelope](docs/ResponseEnvelope.md)
|
|
257
327
|
- [Crisphive::ServiceArea](docs/ServiceArea.md)
|
|
328
|
+
- [Crisphive::ServiceAreaCreateRequest](docs/ServiceAreaCreateRequest.md)
|
|
329
|
+
- [Crisphive::ServiceAreaCreateResponse](docs/ServiceAreaCreateResponse.md)
|
|
258
330
|
- [Crisphive::ServiceAreaList](docs/ServiceAreaList.md)
|
|
331
|
+
- [Crisphive::ServiceAreaUpdateRequest](docs/ServiceAreaUpdateRequest.md)
|
|
259
332
|
- [Crisphive::Skill](docs/Skill.md)
|
|
260
333
|
- [Crisphive::SkillByCategoryList](docs/SkillByCategoryList.md)
|
|
261
334
|
- [Crisphive::SkillCategory](docs/SkillCategory.md)
|
|
335
|
+
- [Crisphive::SkillCategoryCreateRequest](docs/SkillCategoryCreateRequest.md)
|
|
336
|
+
- [Crisphive::SkillCategoryCreateResponse](docs/SkillCategoryCreateResponse.md)
|
|
262
337
|
- [Crisphive::SkillCategoryList](docs/SkillCategoryList.md)
|
|
338
|
+
- [Crisphive::SkillCreateRequest](docs/SkillCreateRequest.md)
|
|
339
|
+
- [Crisphive::SkillCreateResponse](docs/SkillCreateResponse.md)
|
|
263
340
|
- [Crisphive::SkillList](docs/SkillList.md)
|
|
264
341
|
- [Crisphive::SkillSummary](docs/SkillSummary.md)
|
|
342
|
+
- [Crisphive::SkillUpdateRequest](docs/SkillUpdateRequest.md)
|
|
265
343
|
- [Crisphive::Technician](docs/Technician.md)
|
|
266
344
|
- [Crisphive::TechnicianAddress](docs/TechnicianAddress.md)
|
|
267
345
|
- [Crisphive::TechnicianAddressInput](docs/TechnicianAddressInput.md)
|
|
@@ -281,11 +359,21 @@ Class | Method | HTTP request | Description
|
|
|
281
359
|
- [Crisphive::TechnicianSkillList](docs/TechnicianSkillList.md)
|
|
282
360
|
- [Crisphive::TechnicianSkillsRequest](docs/TechnicianSkillsRequest.md)
|
|
283
361
|
- [Crisphive::TechnicianStatus](docs/TechnicianStatus.md)
|
|
362
|
+
- [Crisphive::TechnicianTimeOff](docs/TechnicianTimeOff.md)
|
|
363
|
+
- [Crisphive::TechnicianTimeOffCreateRequest](docs/TechnicianTimeOffCreateRequest.md)
|
|
364
|
+
- [Crisphive::TechnicianTimeOffCreateResponse](docs/TechnicianTimeOffCreateResponse.md)
|
|
365
|
+
- [Crisphive::TechnicianTimeOffList](docs/TechnicianTimeOffList.md)
|
|
284
366
|
- [Crisphive::TechnicianUpdateRequest](docs/TechnicianUpdateRequest.md)
|
|
285
367
|
- [Crisphive::TechnicianVehiclesRequest](docs/TechnicianVehiclesRequest.md)
|
|
286
368
|
- [Crisphive::Vehicle](docs/Vehicle.md)
|
|
369
|
+
- [Crisphive::VehicleCreateRequest](docs/VehicleCreateRequest.md)
|
|
370
|
+
- [Crisphive::VehicleCreateResponse](docs/VehicleCreateResponse.md)
|
|
287
371
|
- [Crisphive::VehicleList](docs/VehicleList.md)
|
|
288
372
|
- [Crisphive::VehicleOwner](docs/VehicleOwner.md)
|
|
373
|
+
- [Crisphive::VehicleUpdateRequest](docs/VehicleUpdateRequest.md)
|
|
374
|
+
- [Crisphive::WebhookCreateRequest](docs/WebhookCreateRequest.md)
|
|
375
|
+
- [Crisphive::WebhookCreateResponse](docs/WebhookCreateResponse.md)
|
|
376
|
+
- [Crisphive::WebhookVerification](docs/WebhookVerification.md)
|
|
289
377
|
|
|
290
378
|
|
|
291
379
|
## Documentation for Authorization
|
|
@@ -19,6 +19,280 @@ 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
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
|
|
@@ -353,5 +627,79 @@ module Crisphive
|
|
|
353
627
|
end
|
|
354
628
|
return data, status_code, headers
|
|
355
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
|
|
356
704
|
end
|
|
357
705
|
end
|