opendoor-partner-sdk-server-ruby 1.1.6.beta.95.1 → 1.1.6.beta.96.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c2117d435a9f19095ab92de59e74738367cd64c4ad81175a3332ea2d768dda9
4
- data.tar.gz: de17c00ba63cb748349e38c3471aed0924436eb8a1a5319dccf0504bc5072a94
3
+ metadata.gz: b19f94f8fe656a6c73ea5ba419d0020e292668ab93b747cfd70db50dbad4acdb
4
+ data.tar.gz: 56fb22852b0d88ecc221846abc07b530b48e0ae83f142e256b762364b57f5415
5
5
  SHA512:
6
- metadata.gz: '03385a0a87ab15768d411e288bc93b0c5409432b8e826f2ed6014cda6ff3a8f6c0b5a2dd0d9b058a980564f39c5e4ff4c86ee912a0032df1507026a859f4ef06'
7
- data.tar.gz: 83316275c5af60f9d709dc4a89214ff1d65f529d24a306a26e6ff5e6468e0c93919e12de8ba4016854de4ab316a061f8177b80902d9c96f017d879f4812676c5
6
+ metadata.gz: fc5b3cae8066717f26ec7da2d83674553f289d63cfdd611592663fb85ce1949fae29c9f142e4244ec8ac6b73eb5ea4ecda454532f54ebf0d2ce369f45f280de6
7
+ data.tar.gz: 1a9a9ca8b4b650cece3f8d45659f0646ae514d6fc2ab2f075116c0dc87053d59e4b34ec18faff1fca03300b3054d14240aade57ef7a13f7b69acc31d482fe988
@@ -216,7 +216,7 @@ module Opendoor
216
216
  }
217
217
  end
218
218
 
219
- def get_assessment_slots(offer_id:)
219
+ def get_assessment_slots(offer_id:, calendar_type: "ASSESSMENT_VISIT")
220
220
  raise ValidationError.new("offerId is required", "offerId") if blank?(offer_id)
221
221
 
222
222
  api_base = graphql_api_origin
@@ -233,7 +233,9 @@ module Opendoor
233
233
  body: JSON.generate(
234
234
  partnerId: @api_key,
235
235
  sellerInputUuid: offer_id,
236
- calendarType: "DILIGENCE_VISIT"
236
+ # Default: pre-UW assessment (the post-IFO Lennar Trade-In path).
237
+ # "DILIGENCE_VISIT" is the post-contract Inspectify visit.
238
+ calendarType: calendar_type
237
239
  )
238
240
  )
239
241
  ensure_ok!(response, "Assessment slots request failed", "NETWORK_ERROR")
@@ -252,6 +254,36 @@ module Opendoor
252
254
  }
253
255
  end
254
256
 
257
+ # Schedule a pre-underwriting home assessment for an offer.
258
+ #
259
+ # Pairs with `get_assessment_slots(calendar_type: "ASSESSMENT_VISIT")` —
260
+ # the customer picks a slot from that response and the SDK calls this
261
+ # method to commit it. Distinct from the post-contract diligence visit,
262
+ # which runs through Inspectify on a different endpoint.
263
+ def schedule_assessment(offer_id:, selected_inspection_time:, reminder_phone: nil, notes: nil)
264
+ raise ValidationError.new("offerId is required", "offerId") if blank?(offer_id)
265
+ if blank?(selected_inspection_time)
266
+ raise ValidationError.new("selectedInspectionTime is required", "selectedInspectionTime")
267
+ end
268
+
269
+ input = {
270
+ sellerInputUuid: offer_id,
271
+ selectedInspectionTime: selected_inspection_time
272
+ }
273
+ input[:reminderPhone] = reminder_phone unless blank?(reminder_phone)
274
+ input[:notes] = notes unless blank?(notes)
275
+
276
+ data = graphql(
277
+ query: Graphql::SCHEDULE_EXTERIOR_ASSESSMENT,
278
+ variables: { input: input }
279
+ )
280
+
281
+ visit_id = data.dig("scheduleExteriorAssessment", "visitId")
282
+ raise ApiError.new("Schedule assessment response missing visitId", "GRAPHQL_ERROR", 200) if blank?(visit_id)
283
+
284
+ { visitId: visit_id }
285
+ end
286
+
255
287
  def get_home_detail(opendoor_offer_request_id:)
256
288
  raise ValidationError.new("opendoorOfferRequestId is required", "opendoorOfferRequestId") if blank?(opendoor_offer_request_id)
257
289
 
@@ -32,6 +32,14 @@ module Opendoor
32
32
  }
33
33
  }
34
34
  GRAPHQL
35
+
36
+ SCHEDULE_EXTERIOR_ASSESSMENT = <<~GRAPHQL.freeze
37
+ mutation ScheduleExteriorAssessment($input: ScheduleExteriorAssessmentInput!) {
38
+ scheduleExteriorAssessment(input: $input) {
39
+ visitId
40
+ }
41
+ }
42
+ GRAPHQL
35
43
  end
36
44
  end
37
45
  end
@@ -1,5 +1,5 @@
1
1
  module Opendoor
2
2
  module PartnerSdk
3
- VERSION = "1.1.6.beta.95.1"
3
+ VERSION = "1.1.6.beta.96.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opendoor-partner-sdk-server-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6.beta.95.1
4
+ version: 1.1.6.beta.96.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Opendoor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-29 00:00:00.000000000 Z
11
+ date: 2026-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest