opendoor-partner-sdk-server-ruby 1.3.1.beta.108.1 → 1.3.2.beta.109.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: 439c09c2837df7de938837576dc36bfa29866187380797060c0f84f3b3463c2b
4
- data.tar.gz: a4ac80690d8010e1c4857040e4df3f79fcf2801d3747f51353aad9aa7ba0b54d
3
+ metadata.gz: b51b1c174eb95e579820ee7cff264a50c3f8f942b7a90fcb91ae6b0bff79e816
4
+ data.tar.gz: 2228a6a28efce5faa1673d0b5f3d4c2346ad78bbe64116cf7146b42418373a51
5
5
  SHA512:
6
- metadata.gz: ebede7348d7cab64d5ba20808a09f75da9172a59147294463348bd3556340947f9d05a3ad7a847979e4a458629a15ea35a140e4dddea97cd2807c0071ce2203a
7
- data.tar.gz: 12d931177edd97533c11e3bd90e36959d90a8d906b51bee471034b4881e136d9a52c6b04b3b1f6b6f2efd1620837e66466ff46afd199713dd60b71281be39586
6
+ metadata.gz: 8d8a63a140baaf91e6aa9daef6be8f3f6863024680dfe1dad72200802d617ae117568c63e2efd0fb0a9de91b3e51e63e4a01db33397af8168385fce0f834d8a8
7
+ data.tar.gz: be45329bd36d0339027dbf1f8faaf5018f6af9d2841e0ebfd0d4448ab5a1eb3b29a67aca7d05863f7b14f0705f7b283636a1049cba4ad7c142883d19775dc057
@@ -283,6 +283,30 @@ module Opendoor
283
283
  { answerPrefills: seller_prefills["answerPrefills"] || {} }
284
284
  end
285
285
 
286
+ # Get the customer's name, email, and phone for an offer request.
287
+ # Useful for prefilling downstream steps (e.g. assessment scheduling)
288
+ # when only the offer UUID is available client-side.
289
+ # Requires the offer to have reached OFFERED — earlier states raise NOT_FOUND.
290
+ def get_customer_contact(opendoor_offer_request_id:)
291
+ raise ValidationError.new("opendoorOfferRequestId is required", "opendoorOfferRequestId") if blank?(opendoor_offer_request_id)
292
+
293
+ data = graphql(
294
+ query: Graphql::CUSTOMER_CONTACT_QUERY,
295
+ variables: { opendoorOfferRequestId: opendoor_offer_request_id }
296
+ )
297
+
298
+ contact = data["customerContact"] || {}
299
+ # Coerce blank strings to nil for parity with the JS SDK's undefined
300
+ # semantics. Preserve nil keys (no .compact) so dual-stack partners get
301
+ # the same key set in both languages.
302
+ present = ->(v) { v.is_a?(String) && !v.empty? ? v : nil }
303
+ {
304
+ fullName: present.call(contact["fullName"]),
305
+ email: present.call(contact["email"]),
306
+ phoneNumber: present.call(contact["phoneNumber"])
307
+ }
308
+ end
309
+
286
310
  private
287
311
 
288
312
  def resolve_prediction(prediction, session_token)
@@ -170,6 +170,19 @@ module Opendoor
170
170
  }
171
171
  GRAPHQL
172
172
 
173
+ # Customer's name, email, and phone for an offer request — for prefilling
174
+ # downstream steps (e.g. assessment-scheduling) from just the offer UUID.
175
+ # Requires the offer to have reached OFFERED; earlier states return NOT_FOUND.
176
+ CUSTOMER_CONTACT_QUERY = <<~GRAPHQL.freeze
177
+ query CustomerContact($opendoorOfferRequestId: String!) {
178
+ customerContact(opendoorOfferRequestId: $opendoorOfferRequestId) {
179
+ fullName
180
+ email
181
+ phoneNumber
182
+ }
183
+ }
184
+ GRAPHQL
185
+
173
186
  # `calendarType` is "ASSESSMENT_VISIT" for the pre-underwriting home
174
187
  # assessment (post-IFO Lennar Trade-In path) or "DILIGENCE_VISIT" for
175
188
  # the post-contract Inspectify visit.
@@ -1,5 +1,5 @@
1
1
  module Opendoor
2
2
  module PartnerSdk
3
- VERSION = "1.3.1.beta.108.1"
3
+ VERSION = "1.3.2.beta.109.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.3.1.beta.108.1
4
+ version: 1.3.2.beta.109.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-06-05 00:00:00.000000000 Z
11
+ date: 2026-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest