crisphive 0.1.0 → 0.2.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.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +90 -11
  3. data/crisphive.gemspec +5 -5
  4. data/lib/crisphive/api/business_skill_api.rb +154 -8
  5. data/lib/crisphive/api/customer_api.rb +15 -12
  6. data/lib/crisphive/api/job_request_business_api.rb +1002 -112
  7. data/lib/crisphive/api/job_types_api.rb +6 -2
  8. data/lib/crisphive/api/service_area_api.rb +6 -6
  9. data/lib/crisphive/api/technician_api.rb +510 -6
  10. data/lib/crisphive/api/vehicle_api.rb +6 -6
  11. data/lib/crisphive/api_client.rb +2 -2
  12. data/lib/crisphive/api_error.rb +2 -2
  13. data/lib/crisphive/configuration.rb +3 -3
  14. data/lib/crisphive/models/commit_emergency_reschedule200_response.rb +253 -0
  15. data/lib/crisphive/models/commit_job_request_move200_response.rb +253 -0
  16. data/lib/crisphive/models/create_customer200_response.rb +5 -2
  17. data/lib/crisphive/models/create_job_request200_response.rb +5 -2
  18. data/lib/crisphive/models/create_technician200_response.rb +253 -0
  19. data/lib/crisphive/models/customer.rb +2 -2
  20. data/lib/crisphive/models/customer_address.rb +2 -2
  21. data/lib/crisphive/models/customer_address_request.rb +11 -2
  22. data/lib/crisphive/models/customer_contact.rb +2 -2
  23. data/lib/crisphive/models/customer_create_request.rb +2 -2
  24. data/lib/crisphive/models/customer_create_response.rb +2 -2
  25. data/lib/crisphive/models/customer_list.rb +3 -3
  26. data/lib/crisphive/models/customer_list_item.rb +2 -2
  27. data/lib/crisphive/models/customer_profile.rb +2 -2
  28. data/lib/crisphive/models/customer_spending.rb +2 -2
  29. data/lib/crisphive/models/customer_tier_progress.rb +2 -2
  30. data/lib/crisphive/models/customer_update_request.rb +2 -2
  31. data/lib/crisphive/models/get_customer200_response.rb +5 -2
  32. data/lib/crisphive/models/get_job_request200_response.rb +5 -2
  33. data/lib/crisphive/models/get_job_request_timeline200_response.rb +5 -2
  34. data/lib/crisphive/models/get_job_type200_response.rb +5 -2
  35. data/lib/crisphive/models/get_service_area200_response.rb +5 -2
  36. data/lib/crisphive/models/get_technician200_response.rb +5 -2
  37. data/lib/crisphive/models/get_technician_schedule200_response.rb +253 -0
  38. data/lib/crisphive/models/get_vehicle200_response.rb +5 -2
  39. data/lib/crisphive/models/job_date.rb +5 -3
  40. data/lib/crisphive/models/job_date_business_range.rb +7 -3
  41. data/lib/crisphive/models/job_date_period.rb +2 -2
  42. data/lib/crisphive/models/job_date_period_entry.rb +4 -2
  43. data/lib/crisphive/models/job_request.rb +46 -6
  44. data/lib/crisphive/models/job_request_action_audit_by.rb +2 -2
  45. data/lib/crisphive/models/job_request_action_audit_entry.rb +3 -3
  46. data/lib/crisphive/models/job_request_action_summary.rb +2 -2
  47. data/lib/crisphive/models/job_request_address_summary.rb +2 -2
  48. data/lib/crisphive/models/job_request_archive_summary.rb +2 -2
  49. data/lib/crisphive/models/job_request_arrival_window.rb +4 -4
  50. data/lib/crisphive/models/job_request_assigned_vehicle.rb +2 -2
  51. data/lib/crisphive/models/job_request_assignment_summary.rb +2 -2
  52. data/lib/crisphive/models/job_request_attention_summary.rb +259 -0
  53. data/lib/crisphive/models/job_request_available_vehicle.rb +235 -0
  54. data/lib/crisphive/models/job_request_booking_windows.rb +2 -2
  55. data/lib/crisphive/models/job_request_buddy_slot_candidates.rb +239 -0
  56. data/lib/crisphive/models/job_request_business_time_range.rb +3 -3
  57. data/lib/crisphive/models/job_request_changes.rb +2 -2
  58. data/lib/crisphive/models/job_request_confirm_request.rb +245 -0
  59. data/lib/crisphive/models/job_request_create_request.rb +60 -6
  60. data/lib/crisphive/models/job_request_create_response.rb +2 -2
  61. data/lib/crisphive/models/job_request_crew_candidates.rb +227 -0
  62. data/lib/crisphive/models/job_request_crew_change.rb +299 -0
  63. data/lib/crisphive/models/job_request_crew_member.rb +7 -4
  64. data/lib/crisphive/models/job_request_crew_member_input.rb +284 -0
  65. data/lib/crisphive/models/job_request_crew_recommendation.rb +255 -0
  66. data/lib/crisphive/models/job_request_customer_summary.rb +2 -2
  67. data/lib/crisphive/models/job_request_day_windows.rb +3 -3
  68. data/lib/crisphive/models/job_request_emergency_candidate.rb +297 -0
  69. data/lib/crisphive/models/job_request_emergency_candidates.rb +311 -0
  70. data/lib/crisphive/models/job_request_emergency_candidates_request.rb +328 -0
  71. data/lib/crisphive/models/job_request_emergency_commit_request.rb +351 -0
  72. data/lib/crisphive/models/job_request_emergency_plan.rb +345 -0
  73. data/lib/crisphive/models/job_request_emergency_preview_request.rb +329 -0
  74. data/lib/crisphive/models/job_request_job_date_business_range_request.rb +3 -3
  75. data/lib/crisphive/models/job_request_job_date_period_request.rb +2 -2
  76. data/lib/crisphive/models/job_request_job_date_request.rb +3 -3
  77. data/lib/crisphive/models/job_request_lead_candidate.rb +311 -0
  78. data/lib/crisphive/models/job_request_list.rb +2 -2
  79. data/lib/crisphive/models/job_request_move_commit_req.rb +343 -0
  80. data/lib/crisphive/models/job_request_move_member.rb +299 -0
  81. data/lib/crisphive/models/job_request_move_plan.rb +377 -0
  82. data/lib/crisphive/models/job_request_move_preview_req.rb +290 -0
  83. data/lib/crisphive/models/job_request_move_warning.rb +311 -0
  84. data/lib/crisphive/models/job_request_period.rb +2 -2
  85. data/lib/crisphive/models/job_request_quote_request.rb +340 -0
  86. data/lib/crisphive/models/job_request_quote_summary.rb +2 -2
  87. data/lib/crisphive/models/job_request_rating_summary.rb +2 -2
  88. data/lib/crisphive/models/job_request_reschedule_day.rb +227 -0
  89. data/lib/crisphive/models/job_request_reschedule_move.rb +319 -0
  90. data/lib/crisphive/models/job_request_reschedule_reassignment.rb +339 -0
  91. data/lib/crisphive/models/job_request_schedule.rb +2 -2
  92. data/lib/crisphive/models/job_request_session.rb +8 -7
  93. data/lib/crisphive/models/job_request_skill_summary.rb +2 -2
  94. data/lib/crisphive/models/job_request_status_summary.rb +2 -2
  95. data/lib/crisphive/models/job_request_tech_candidate.rb +287 -0
  96. data/lib/crisphive/models/job_request_technician_info.rb +2 -2
  97. data/lib/crisphive/models/job_request_time_segments.rb +287 -0
  98. data/lib/crisphive/models/job_request_time_segments_business_time.rb +321 -0
  99. data/lib/crisphive/models/job_request_time_segments_day.rb +247 -0
  100. data/lib/crisphive/models/job_request_time_segments_slot.rb +375 -0
  101. data/lib/crisphive/models/job_request_time_segments_worker.rb +295 -0
  102. data/lib/crisphive/models/job_request_timeline.rb +2 -2
  103. data/lib/crisphive/models/job_request_timeline_action.rb +2 -2
  104. data/lib/crisphive/models/job_request_timeline_event.rb +2 -2
  105. data/lib/crisphive/models/job_request_update_priority_request.rb +295 -0
  106. data/lib/crisphive/models/job_type.rb +2 -2
  107. data/lib/crisphive/models/list_crew_candidates200_response.rb +253 -0
  108. data/lib/crisphive/models/list_customers200_response.rb +5 -2
  109. data/lib/crisphive/models/list_emergency_candidates200_response.rb +253 -0
  110. data/lib/crisphive/models/list_job_request_booking_windows200_response.rb +5 -2
  111. data/lib/crisphive/models/list_job_request_changes200_response.rb +5 -2
  112. data/lib/crisphive/models/list_job_requests200_response.rb +5 -2
  113. data/lib/crisphive/models/list_job_types200_response.rb +5 -2
  114. data/lib/crisphive/models/list_matching_slots200_response.rb +253 -0
  115. data/lib/crisphive/models/list_nearby_technicians200_response.rb +253 -0
  116. data/lib/crisphive/models/list_service_areas200_response.rb +5 -2
  117. data/lib/crisphive/models/list_skill_categories200_response.rb +5 -2
  118. data/lib/crisphive/models/list_skills200_response.rb +5 -2
  119. data/lib/crisphive/models/list_skills_by_category200_response.rb +5 -2
  120. data/lib/crisphive/models/list_technician_skills200_response.rb +253 -0
  121. data/lib/crisphive/models/list_technicians200_response.rb +5 -2
  122. data/lib/crisphive/models/list_vehicles200_response.rb +5 -2
  123. data/lib/crisphive/models/nearby_technician.rb +319 -0
  124. data/lib/crisphive/models/nearby_technicians.rb +237 -0
  125. data/lib/crisphive/models/pagination.rb +7 -2
  126. data/lib/crisphive/models/replace_technician_service_areas200_response.rb +253 -0
  127. data/lib/crisphive/models/response_envelope.rb +6 -2
  128. data/lib/crisphive/models/service_area.rb +2 -2
  129. data/lib/crisphive/models/service_area_list.rb +2 -2
  130. data/lib/crisphive/models/skill.rb +9 -2
  131. data/lib/crisphive/models/skill_by_category_list.rb +4 -2
  132. data/lib/crisphive/models/skill_category.rb +7 -2
  133. data/lib/crisphive/models/skill_category_list.rb +4 -2
  134. data/lib/crisphive/models/skill_list.rb +2 -2
  135. data/lib/crisphive/models/skill_summary.rb +2 -2
  136. data/lib/crisphive/models/technician.rb +2 -2
  137. data/lib/crisphive/models/technician_address.rb +2 -2
  138. data/lib/crisphive/models/technician_address_input.rb +408 -0
  139. data/lib/crisphive/models/technician_buddies_request.rb +236 -0
  140. data/lib/crisphive/models/technician_create_request.rb +600 -0
  141. data/lib/crisphive/models/technician_create_response.rb +215 -0
  142. data/lib/crisphive/models/technician_lead_ref.rb +2 -2
  143. data/lib/crisphive/models/technician_leads_request.rb +236 -0
  144. data/lib/crisphive/models/technician_list.rb +3 -3
  145. data/lib/crisphive/models/technician_schedule.rb +279 -0
  146. data/lib/crisphive/models/technician_schedule_block.rb +225 -0
  147. data/lib/crisphive/models/technician_schedule_session.rb +311 -0
  148. data/lib/crisphive/models/technician_service_area_ref.rb +2 -2
  149. data/lib/crisphive/models/technician_service_areas_request.rb +236 -0
  150. data/lib/crisphive/models/technician_service_areas_response.rb +217 -0
  151. data/lib/crisphive/models/technician_skill.rb +265 -0
  152. data/lib/crisphive/models/technician_skill_list.rb +227 -0
  153. data/lib/crisphive/models/technician_skills_request.rb +236 -0
  154. data/lib/crisphive/models/technician_status.rb +2 -2
  155. data/lib/crisphive/models/technician_update_request.rb +507 -0
  156. data/lib/crisphive/models/technician_vehicles_request.rb +236 -0
  157. data/lib/crisphive/models/vehicle.rb +26 -4
  158. data/lib/crisphive/models/vehicle_list.rb +2 -2
  159. data/lib/crisphive/models/vehicle_owner.rb +2 -2
  160. data/lib/crisphive/version.rb +3 -3
  161. data/lib/crisphive.rb +60 -2
  162. data/spec/spec_helper.rb +2 -2
  163. metadata +63 -5
@@ -0,0 +1,236 @@
1
+ =begin
2
+ #Crisphive Developer API
3
+
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
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Crisphive
17
+ class TechnicianVehiclesRequest
18
+ # Vehicle ids (max 50). Discover via GET /vehicles.
19
+ attr_accessor :vehicle_ids
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'vehicle_ids' => :'vehicle_ids'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'vehicle_ids' => :'Array<String>'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Crisphive::TechnicianVehiclesRequest` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Crisphive::TechnicianVehiclesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'vehicle_ids')
62
+ if (value = attributes[:'vehicle_ids']).is_a?(Array)
63
+ self.vehicle_ids = value
64
+ end
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
72
+ invalid_properties = Array.new
73
+ if !@vehicle_ids.nil? && @vehicle_ids.length > 50
74
+ invalid_properties.push('invalid value for "vehicle_ids", number of items must be less than or equal to 50.')
75
+ end
76
+
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
+ return false if !@vehicle_ids.nil? && @vehicle_ids.length > 50
85
+ true
86
+ end
87
+
88
+ # Custom attribute writer method with validation
89
+ # @param [Object] vehicle_ids Value to be assigned
90
+ def vehicle_ids=(vehicle_ids)
91
+ if vehicle_ids.nil?
92
+ fail ArgumentError, 'vehicle_ids cannot be nil'
93
+ end
94
+
95
+ if vehicle_ids.length > 50
96
+ fail ArgumentError, 'invalid value for "vehicle_ids", number of items must be less than or equal to 50.'
97
+ end
98
+
99
+ @vehicle_ids = vehicle_ids
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ vehicle_ids == o.vehicle_ids
108
+ end
109
+
110
+ # @see the `==` method
111
+ # @param [Object] Object to be compared
112
+ def eql?(o)
113
+ self == o
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ def hash
119
+ [vehicle_ids].hash
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def self.build_from_hash(attributes)
126
+ return nil unless attributes.is_a?(Hash)
127
+ attributes = attributes.transform_keys(&:to_sym)
128
+ transformed_hash = {}
129
+ openapi_types.each_pair do |key, type|
130
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
131
+ transformed_hash["#{key}"] = nil
132
+ elsif type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[attribute_map[key]].is_a?(Array)
136
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
137
+ end
138
+ elsif !attributes[attribute_map[key]].nil?
139
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
140
+ end
141
+ end
142
+ new(transformed_hash)
143
+ end
144
+
145
+ # Deserializes the data based on type
146
+ # @param string type Data type
147
+ # @param string value Value to be deserialized
148
+ # @return [Object] Deserialized data
149
+ def self._deserialize(type, value)
150
+ case type.to_sym
151
+ when :Time
152
+ Time.parse(value)
153
+ when :Date
154
+ Date.parse(value)
155
+ when :String
156
+ value.to_s
157
+ when :Integer
158
+ value.to_i
159
+ when :Float
160
+ value.to_f
161
+ when :Boolean
162
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
163
+ true
164
+ else
165
+ false
166
+ end
167
+ when :Object
168
+ # generic object (usually a Hash), return directly
169
+ value
170
+ when /\AArray<(?<inner_type>.+)>\z/
171
+ inner_type = Regexp.last_match[:inner_type]
172
+ value.map { |v| _deserialize(inner_type, v) }
173
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
174
+ k_type = Regexp.last_match[:k_type]
175
+ v_type = Regexp.last_match[:v_type]
176
+ {}.tap do |hash|
177
+ value.each do |k, v|
178
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
179
+ end
180
+ end
181
+ else # model
182
+ # models (e.g. Pet) or oneOf
183
+ klass = Crisphive.const_get(type)
184
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
185
+ end
186
+ end
187
+
188
+ # Returns the string representation of the object
189
+ # @return [String] String presentation of the object
190
+ def to_s
191
+ to_hash.to_s
192
+ end
193
+
194
+ # to_body is an alias to to_hash (backward compatibility)
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_body
197
+ to_hash
198
+ end
199
+
200
+ # Returns the object in the form of hash
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_hash
203
+ hash = {}
204
+ self.class.attribute_map.each_pair do |attr, param|
205
+ value = self.send(attr)
206
+ if value.nil?
207
+ is_nullable = self.class.openapi_nullable.include?(attr)
208
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
+ end
210
+
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ # Outputs non-array value in the form of hash
217
+ # For object, use to_hash. Otherwise, just return the value
218
+ # @param [Object] value Any valid value
219
+ # @return [Hash] Returns the value in the form of hash
220
+ def _to_hash(value)
221
+ if value.is_a?(Array)
222
+ value.compact.map { |v| _to_hash(v) }
223
+ elsif value.is_a?(Hash)
224
+ {}.tap do |hash|
225
+ value.each { |k, v| hash[k] = _to_hash(v) }
226
+ end
227
+ elsif value.respond_to? :to_hash
228
+ value.to_hash
229
+ else
230
+ value
231
+ end
232
+ end
233
+
234
+ end
235
+
236
+ end
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #CrispHive Developer API
2
+ #Crisphive Developer API
3
3
 
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> }`.
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
 
@@ -39,13 +39,16 @@ module Crisphive
39
39
  # Vehicle display name.
40
40
  attr_accessor :name
41
41
 
42
+ # Live operational state derived from the vehicle's jobs: on_job = a job's scheduled window contains now (the vehicle is out working); assigned = attached to an upcoming/open job that is not in progress; other values mirror status.
43
+ attr_accessor :operational_status
44
+
42
45
  # The technician who currently owns (claimed) this vehicle; null if unowned.
43
46
  attr_accessor :owner
44
47
 
45
48
  # License plate number. Empty if not set.
46
49
  attr_accessor :plate_number
47
50
 
48
- # Operational status.
51
+ # Stored status. on_job here means \"attached to an open job\" (set at assignment, cleared at complete/archive/unassign) — see operational_status for the live state.
49
52
  attr_accessor :status
50
53
 
51
54
  # UUIDs of technicians who use this vehicle (derived from each technician's vehicle list). Empty array if none.
@@ -96,6 +99,7 @@ module Crisphive
96
99
  :'id' => :'id',
97
100
  :'model' => :'model',
98
101
  :'name' => :'name',
102
+ :'operational_status' => :'operational_status',
99
103
  :'owner' => :'owner',
100
104
  :'plate_number' => :'plate_number',
101
105
  :'status' => :'status',
@@ -123,6 +127,7 @@ module Crisphive
123
127
  :'id' => :'String',
124
128
  :'model' => :'String',
125
129
  :'name' => :'String',
130
+ :'operational_status' => :'String',
126
131
  :'owner' => :'VehicleOwner',
127
132
  :'plate_number' => :'String',
128
133
  :'status' => :'String',
@@ -187,6 +192,10 @@ module Crisphive
187
192
  self.name = attributes[:'name']
188
193
  end
189
194
 
195
+ if attributes.key?(:'operational_status')
196
+ self.operational_status = attributes[:'operational_status']
197
+ end
198
+
190
199
  if attributes.key?(:'owner')
191
200
  self.owner = attributes[:'owner']
192
201
  end
@@ -234,6 +243,8 @@ module Crisphive
234
243
  # @return true if the model is valid
235
244
  def valid?
236
245
  warn '[DEPRECATED] the `valid?` method is obsolete'
246
+ operational_status_validator = EnumAttributeValidator.new('String', ["inactive", "idle", "assigned", "on_job", "maintenance"])
247
+ return false unless operational_status_validator.valid?(@operational_status)
237
248
  status_validator = EnumAttributeValidator.new('String', ["inactive", "idle", "on_job", "maintenance"])
238
249
  return false unless status_validator.valid?(@status)
239
250
  vehicle_type_validator = EnumAttributeValidator.new('String', ["van", "truck", "car"])
@@ -241,6 +252,16 @@ module Crisphive
241
252
  true
242
253
  end
243
254
 
255
+ # Custom attribute writer method checking allowed values (enum).
256
+ # @param [Object] operational_status Object to be assigned
257
+ def operational_status=(operational_status)
258
+ validator = EnumAttributeValidator.new('String', ["inactive", "idle", "assigned", "on_job", "maintenance"])
259
+ unless validator.valid?(operational_status)
260
+ fail ArgumentError, "invalid value for \"operational_status\", must be one of #{validator.allowable_values}."
261
+ end
262
+ @operational_status = operational_status
263
+ end
264
+
244
265
  # Custom attribute writer method checking allowed values (enum).
245
266
  # @param [Object] status Object to be assigned
246
267
  def status=(status)
@@ -274,6 +295,7 @@ module Crisphive
274
295
  id == o.id &&
275
296
  model == o.model &&
276
297
  name == o.name &&
298
+ operational_status == o.operational_status &&
277
299
  owner == o.owner &&
278
300
  plate_number == o.plate_number &&
279
301
  status == o.status &&
@@ -293,7 +315,7 @@ module Crisphive
293
315
  # Calculates hash code according to all attributes.
294
316
  # @return [Integer] Hash code
295
317
  def hash
296
- [brand, business_id, created_at, current_mileage, deleted_at, id, model, name, owner, plate_number, status, technician_ids, updated_at, utilization_percent, vehicle_type, year].hash
318
+ [brand, business_id, created_at, current_mileage, deleted_at, id, model, name, operational_status, owner, plate_number, status, technician_ids, updated_at, utilization_percent, vehicle_type, year].hash
297
319
  end
298
320
 
299
321
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #CrispHive Developer API
2
+ #Crisphive Developer API
3
3
 
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> }`.
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
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #CrispHive Developer API
2
+ #Crisphive Developer API
3
3
 
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> }`.
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
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #CrispHive Developer API
2
+ #Crisphive Developer API
3
3
 
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> }`.
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
 
@@ -11,5 +11,5 @@ Generator version: 7.11.0
11
11
  =end
12
12
 
13
13
  module Crisphive
14
- VERSION = '0.1.0'
14
+ VERSION = '0.2.0'
15
15
  end
data/lib/crisphive.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #CrispHive Developer API
2
+ #Crisphive Developer API
3
3
 
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> }`.
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
 
@@ -17,8 +17,11 @@ require 'crisphive/version'
17
17
  require 'crisphive/configuration'
18
18
 
19
19
  # Models
20
+ require 'crisphive/models/commit_emergency_reschedule200_response'
21
+ require 'crisphive/models/commit_job_request_move200_response'
20
22
  require 'crisphive/models/create_customer200_response'
21
23
  require 'crisphive/models/create_job_request200_response'
24
+ require 'crisphive/models/create_technician200_response'
22
25
  require 'crisphive/models/customer'
23
26
  require 'crisphive/models/customer_address'
24
27
  require 'crisphive/models/customer_address_request'
@@ -37,6 +40,7 @@ require 'crisphive/models/get_job_request_timeline200_response'
37
40
  require 'crisphive/models/get_job_type200_response'
38
41
  require 'crisphive/models/get_service_area200_response'
39
42
  require 'crisphive/models/get_technician200_response'
43
+ require 'crisphive/models/get_technician_schedule200_response'
40
44
  require 'crisphive/models/get_vehicle200_response'
41
45
  require 'crisphive/models/job_date'
42
46
  require 'crisphive/models/job_date_business_range'
@@ -51,42 +55,81 @@ require 'crisphive/models/job_request_archive_summary'
51
55
  require 'crisphive/models/job_request_arrival_window'
52
56
  require 'crisphive/models/job_request_assigned_vehicle'
53
57
  require 'crisphive/models/job_request_assignment_summary'
58
+ require 'crisphive/models/job_request_attention_summary'
59
+ require 'crisphive/models/job_request_available_vehicle'
54
60
  require 'crisphive/models/job_request_booking_windows'
61
+ require 'crisphive/models/job_request_buddy_slot_candidates'
55
62
  require 'crisphive/models/job_request_business_time_range'
56
63
  require 'crisphive/models/job_request_changes'
64
+ require 'crisphive/models/job_request_confirm_request'
57
65
  require 'crisphive/models/job_request_create_request'
58
66
  require 'crisphive/models/job_request_create_response'
67
+ require 'crisphive/models/job_request_crew_candidates'
68
+ require 'crisphive/models/job_request_crew_change'
59
69
  require 'crisphive/models/job_request_crew_member'
70
+ require 'crisphive/models/job_request_crew_member_input'
71
+ require 'crisphive/models/job_request_crew_recommendation'
60
72
  require 'crisphive/models/job_request_customer_summary'
61
73
  require 'crisphive/models/job_request_day_windows'
74
+ require 'crisphive/models/job_request_emergency_candidate'
75
+ require 'crisphive/models/job_request_emergency_candidates'
76
+ require 'crisphive/models/job_request_emergency_candidates_request'
77
+ require 'crisphive/models/job_request_emergency_commit_request'
78
+ require 'crisphive/models/job_request_emergency_plan'
79
+ require 'crisphive/models/job_request_emergency_preview_request'
62
80
  require 'crisphive/models/job_request_job_date_business_range_request'
63
81
  require 'crisphive/models/job_request_job_date_period_request'
64
82
  require 'crisphive/models/job_request_job_date_request'
83
+ require 'crisphive/models/job_request_lead_candidate'
65
84
  require 'crisphive/models/job_request_list'
85
+ require 'crisphive/models/job_request_move_commit_req'
86
+ require 'crisphive/models/job_request_move_member'
87
+ require 'crisphive/models/job_request_move_plan'
88
+ require 'crisphive/models/job_request_move_preview_req'
89
+ require 'crisphive/models/job_request_move_warning'
66
90
  require 'crisphive/models/job_request_period'
91
+ require 'crisphive/models/job_request_quote_request'
67
92
  require 'crisphive/models/job_request_quote_summary'
68
93
  require 'crisphive/models/job_request_rating_summary'
94
+ require 'crisphive/models/job_request_reschedule_day'
95
+ require 'crisphive/models/job_request_reschedule_move'
96
+ require 'crisphive/models/job_request_reschedule_reassignment'
69
97
  require 'crisphive/models/job_request_schedule'
70
98
  require 'crisphive/models/job_request_session'
71
99
  require 'crisphive/models/job_request_skill_summary'
72
100
  require 'crisphive/models/job_request_status_summary'
101
+ require 'crisphive/models/job_request_tech_candidate'
73
102
  require 'crisphive/models/job_request_technician_info'
103
+ require 'crisphive/models/job_request_time_segments'
104
+ require 'crisphive/models/job_request_time_segments_business_time'
105
+ require 'crisphive/models/job_request_time_segments_day'
106
+ require 'crisphive/models/job_request_time_segments_slot'
107
+ require 'crisphive/models/job_request_time_segments_worker'
74
108
  require 'crisphive/models/job_request_timeline'
75
109
  require 'crisphive/models/job_request_timeline_action'
76
110
  require 'crisphive/models/job_request_timeline_event'
111
+ require 'crisphive/models/job_request_update_priority_request'
77
112
  require 'crisphive/models/job_type'
113
+ require 'crisphive/models/list_crew_candidates200_response'
78
114
  require 'crisphive/models/list_customers200_response'
115
+ require 'crisphive/models/list_emergency_candidates200_response'
79
116
  require 'crisphive/models/list_job_request_booking_windows200_response'
80
117
  require 'crisphive/models/list_job_request_changes200_response'
81
118
  require 'crisphive/models/list_job_requests200_response'
82
119
  require 'crisphive/models/list_job_types200_response'
120
+ require 'crisphive/models/list_matching_slots200_response'
121
+ require 'crisphive/models/list_nearby_technicians200_response'
83
122
  require 'crisphive/models/list_service_areas200_response'
84
123
  require 'crisphive/models/list_skill_categories200_response'
85
124
  require 'crisphive/models/list_skills200_response'
86
125
  require 'crisphive/models/list_skills_by_category200_response'
126
+ require 'crisphive/models/list_technician_skills200_response'
87
127
  require 'crisphive/models/list_technicians200_response'
88
128
  require 'crisphive/models/list_vehicles200_response'
129
+ require 'crisphive/models/nearby_technician'
130
+ require 'crisphive/models/nearby_technicians'
89
131
  require 'crisphive/models/pagination'
132
+ require 'crisphive/models/replace_technician_service_areas200_response'
90
133
  require 'crisphive/models/response_envelope'
91
134
  require 'crisphive/models/service_area'
92
135
  require 'crisphive/models/service_area_list'
@@ -98,10 +141,25 @@ require 'crisphive/models/skill_list'
98
141
  require 'crisphive/models/skill_summary'
99
142
  require 'crisphive/models/technician'
100
143
  require 'crisphive/models/technician_address'
144
+ require 'crisphive/models/technician_address_input'
145
+ require 'crisphive/models/technician_buddies_request'
146
+ require 'crisphive/models/technician_create_request'
147
+ require 'crisphive/models/technician_create_response'
101
148
  require 'crisphive/models/technician_lead_ref'
149
+ require 'crisphive/models/technician_leads_request'
102
150
  require 'crisphive/models/technician_list'
151
+ require 'crisphive/models/technician_schedule'
152
+ require 'crisphive/models/technician_schedule_block'
153
+ require 'crisphive/models/technician_schedule_session'
103
154
  require 'crisphive/models/technician_service_area_ref'
155
+ require 'crisphive/models/technician_service_areas_request'
156
+ require 'crisphive/models/technician_service_areas_response'
157
+ require 'crisphive/models/technician_skill'
158
+ require 'crisphive/models/technician_skill_list'
159
+ require 'crisphive/models/technician_skills_request'
104
160
  require 'crisphive/models/technician_status'
161
+ require 'crisphive/models/technician_update_request'
162
+ require 'crisphive/models/technician_vehicles_request'
105
163
  require 'crisphive/models/vehicle'
106
164
  require 'crisphive/models/vehicle_list'
107
165
  require 'crisphive/models/vehicle_owner'
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #CrispHive Developer API
2
+ #Crisphive Developer API
3
3
 
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> }`.
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