opendoor-partner-sdk-server-ruby 1.1.6.beta.89.1 → 1.1.6.beta.91.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2935ce634b4b5cdfd8c0fa89615587d3ec3c5d7bf2eadd432979de01075ae7b0
|
|
4
|
+
data.tar.gz: da5d0da5fbd16f1ffcd6f27d6681a5c437e3936fef41eece3700f7d5847a24b1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4abb6ae1301452958b43a46959ee91ab6050ba71f81552dc46b1b5556a9596c65fee555d750e4ed715c7c2f5ca3a16269b6d8ec65bc63eaf1b6a4ca6fca5d09f
|
|
7
|
+
data.tar.gz: 1aa5d813d643412cd20de2333585f542c07be5bf25cb2f69daa42458ed5f315c74bf5c0e875dc59e44ca378c34491c97159566f2da45e01202f250be73a80920
|
data/README.md
CHANGED
|
@@ -39,6 +39,7 @@ The `timeout:` keyword accepts **milliseconds** (default `30_000`), matching `@o
|
|
|
39
39
|
- `update_offer(offer_id:, data:)`
|
|
40
40
|
- `get_offer(offer_id:)`
|
|
41
41
|
- `get_offer_with_sell_direct_pricing(offer_id:)`
|
|
42
|
+
- `get_offer_with_products_pricing(offer_id:)`
|
|
42
43
|
- `check_address_unit(address:)`
|
|
43
44
|
- `get_address_details(address:, tracking_id: nil)`
|
|
44
45
|
- `get_homebuilders`
|
|
@@ -58,15 +59,15 @@ The Gem is **proprietary** to Opendoor Labs. Opendoor distributes it only as the
|
|
|
58
59
|
|
|
59
60
|
CI builds and tests this gem on every PR (`ci.yml`). Releases mirror the JS packages:
|
|
60
61
|
|
|
61
|
-
| Trigger
|
|
62
|
-
|
|
63
|
-
| GitHub **Release** published (semver tag, e.g. `v1.2.3`) | [`publish.yml`](../../.github/workflows/publish.yml) — job `publish-rubygem`
|
|
64
|
-
| Push to **`main`**
|
|
62
|
+
| Trigger | Workflow | What gets published |
|
|
63
|
+
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
64
|
+
| GitHub **Release** published (semver tag, e.g. `v1.2.3`) | [`publish.yml`](../../.github/workflows/publish.yml) — job `publish-rubygem` | Release gem `opendoor-partner-sdk-server-ruby` at that version |
|
|
65
|
+
| Push to **`main`** | [`publish-next.yml`](../../.github/workflows/publish-next.yml) — job `publish-rubygem-next` | Prerelease gem `X.Y.Z.beta.{run}.{attempt}` |
|
|
65
66
|
|
|
66
67
|
### GitHub Actions secrets
|
|
67
68
|
|
|
68
|
-
| Secret
|
|
69
|
-
|
|
69
|
+
| Secret | Required for | Where to get it |
|
|
70
|
+
| ---------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
70
71
|
| **`RUBYGEMS_API_KEY`** | `gem push` to rubygems.org | [rubygems.org → Edit profile → API access](https://rubygems.org/profile/edit). Create a key with permission to **push** gems for this gem name. |
|
|
71
72
|
|
|
72
73
|
Add the secret in the repo: **Settings → Secrets and variables → Actions → New repository secret**. Name must be exactly `RUBYGEMS_API_KEY`.
|
|
@@ -4,6 +4,8 @@ require "securerandom"
|
|
|
4
4
|
require "set"
|
|
5
5
|
require "uri"
|
|
6
6
|
|
|
7
|
+
require_relative "errors"
|
|
8
|
+
|
|
7
9
|
module Opendoor
|
|
8
10
|
module PartnerSdk
|
|
9
11
|
class Client
|
|
@@ -149,6 +151,16 @@ module Opendoor
|
|
|
149
151
|
symbolize_keys(result.fetch("offerRequestWithSellDirectPricing"))
|
|
150
152
|
end
|
|
151
153
|
|
|
154
|
+
def get_offer_with_products_pricing(offer_id:)
|
|
155
|
+
raise ValidationError.new("offerId is required", "offerId") if blank?(offer_id)
|
|
156
|
+
|
|
157
|
+
result = graphql(
|
|
158
|
+
query: Graphql::OFFER_REQUEST_WITH_PRODUCTS_PRICING,
|
|
159
|
+
variables: { opendoorOfferRequestId: offer_id }
|
|
160
|
+
)
|
|
161
|
+
symbolize_keys(result.fetch("offerRequestWithProductsPricing"))
|
|
162
|
+
end
|
|
163
|
+
|
|
152
164
|
def check_address_unit(address:)
|
|
153
165
|
raise ValidationError.new("street1 is required", "street1") if blank?(get(address, :street1))
|
|
154
166
|
|
|
@@ -66,6 +66,59 @@ module Opendoor
|
|
|
66
66
|
}
|
|
67
67
|
GRAPHQL
|
|
68
68
|
|
|
69
|
+
OFFER_REQUEST_WITH_PRODUCTS_PRICING = <<~GRAPHQL.freeze
|
|
70
|
+
query OfferRequestWithProductsPricing($opendoorOfferRequestId: String!) {
|
|
71
|
+
offerRequestWithProductsPricing(opendoorOfferRequestId: $opendoorOfferRequestId) {
|
|
72
|
+
opendoorOfferRequestId
|
|
73
|
+
offerStatus
|
|
74
|
+
denialInfo {
|
|
75
|
+
deniedAt
|
|
76
|
+
code
|
|
77
|
+
explanation
|
|
78
|
+
}
|
|
79
|
+
handoverAt
|
|
80
|
+
sellDirect {
|
|
81
|
+
offerStatus
|
|
82
|
+
denialInfo {
|
|
83
|
+
deniedAt
|
|
84
|
+
code
|
|
85
|
+
explanation
|
|
86
|
+
}
|
|
87
|
+
offerData {
|
|
88
|
+
netProceeds
|
|
89
|
+
sentAt
|
|
90
|
+
expirationAt
|
|
91
|
+
expirationAtDisplayDate
|
|
92
|
+
mortgageBalance
|
|
93
|
+
sellerName
|
|
94
|
+
sellerEmail
|
|
95
|
+
headlinePriceCents
|
|
96
|
+
opendoorFeeCents
|
|
97
|
+
repairCostCents
|
|
98
|
+
closingCostsCents
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
cnml {
|
|
102
|
+
offerStatus
|
|
103
|
+
denialInfo {
|
|
104
|
+
deniedAt
|
|
105
|
+
code
|
|
106
|
+
explanation
|
|
107
|
+
}
|
|
108
|
+
offerData {
|
|
109
|
+
estimatedSalePriceCents
|
|
110
|
+
upfrontCashCents
|
|
111
|
+
estimatedAdditionalProceedsCents
|
|
112
|
+
estimatedTotalProceedsCents
|
|
113
|
+
programFeeCents
|
|
114
|
+
repairCostCents
|
|
115
|
+
closingCostCents
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
GRAPHQL
|
|
121
|
+
|
|
69
122
|
ADDRESS_UNIT_CHECK = <<~GRAPHQL.freeze
|
|
70
123
|
query AddressUnitCheck($address: AddressInput!) {
|
|
71
124
|
addressUnitCheck(address: $address) {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Default require path for `gem "opendoor-partner-sdk-server-ruby"` / Bundler.require.
|
|
4
|
+
# Without this file, Bundler does not auto-load `lib/opendoor/partner_sdk.rb`, so constants
|
|
5
|
+
# like `Opendoor::PartnerSdk::ValidationError` are missing until something loads the SDK tree.
|
|
6
|
+
require_relative "opendoor/partner_sdk"
|
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.
|
|
4
|
+
version: 1.1.6.beta.91.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-
|
|
11
|
+
date: 2026-05-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|
|
@@ -48,6 +48,7 @@ extra_rdoc_files: []
|
|
|
48
48
|
files:
|
|
49
49
|
- LICENSE.txt
|
|
50
50
|
- README.md
|
|
51
|
+
- lib/opendoor-partner-sdk-server-ruby.rb
|
|
51
52
|
- lib/opendoor/partner_sdk.rb
|
|
52
53
|
- lib/opendoor/partner_sdk/answer_key_mapping.rb
|
|
53
54
|
- lib/opendoor/partner_sdk/client.rb
|