shedcloud-partner_api 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/CHANGELOG.md +24 -0
- data/README.md +1 -1
- data/lib/shedcloud/partner_api/client.rb +2 -0
- data/lib/shedcloud/partner_api/resources/location_budgets.rb +30 -0
- data/lib/shedcloud/partner_api/resources/site_events.rb +7 -0
- data/lib/shedcloud/partner_api/scopes.rb +4 -0
- data/lib/shedcloud/partner_api/version.rb +1 -1
- data/lib/shedcloud/partner_api.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a78896e75288ba076d02b6c502db75bc6f645d70f01a84d71d56f2e49d4257c4
|
|
4
|
+
data.tar.gz: ec94a587917290bf4b50a21ed6cdac8494c4b8787bba196d19f69f289a321a5b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c751ed94096c4ee0e4b1d09da5343051e560c729dcba403cd13db15467baebe17a12a32ea24414264859613fc704434789827b3eeaf983503592c5765c636c71
|
|
7
|
+
data.tar.gz: 8e6ce0647d26ab9dcce2c49f9dc45dcdf2f0c549637dbaeb28fc2689842d9edaf2d6daf06b258944761fa61e35ca904637676ef60ca6cc62ccbf71cb49526a51
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0 — 2026-07-26
|
|
4
|
+
|
|
5
|
+
- **Location sales budgets** — `client.location_budgets.list/get/create/update`
|
|
6
|
+
for `GET/POST/PUT /partner/v1/location-budgets` (scopes
|
|
7
|
+
`partner-api.location-budgets.read` / `.write`).
|
|
8
|
+
- Parity with `@shedcloud/partner-api` 0.7.0 and the `shedcloud-api-go` Partner
|
|
9
|
+
API changelog entry (2026-07-25).
|
|
10
|
+
|
|
11
|
+
## Unreleased
|
|
12
|
+
|
|
13
|
+
- **Parametric products** — `client.orders.create` accepts `dimensions` in place of
|
|
14
|
+
`sizeId`, and `client.work_orders.create` accepts `productId` + `dimensions`, for
|
|
15
|
+
products whose bill of materials is a set of rules rather than one bill per size.
|
|
16
|
+
The fields are mutually exclusive (`dimensions` also requires `productId` on work
|
|
17
|
+
orders); both rules are enforced server-side as a `400` and are not duplicated
|
|
18
|
+
client-side. Keys inside `dimensions` are sent verbatim — no key transform, since
|
|
19
|
+
an unrecognised key is a `400` rather than a dropped field.
|
|
20
|
+
- **New `client.bom`** — `dimension_variables` for
|
|
21
|
+
`GET /partner/v1/bom/dimension-variables` (existing scope
|
|
22
|
+
`partner-api.products.read`), listing the accepted keys with their unit, category
|
|
23
|
+
and `isSystem` flag. Read-only: authoring variables is a portal modelling
|
|
24
|
+
decision. Resolve the list per company rather than hard-coding the ten built-ins.
|
|
25
|
+
- Parity with the `shedcloud-api-go` Partner API changelog entry (2026-07-25).
|
|
26
|
+
|
|
3
27
|
## 0.2.0 — 2026-07-19
|
|
4
28
|
|
|
5
29
|
- **Site events** — `client.site_events.track`, `list`, and `each` for
|
data/README.md
CHANGED
|
@@ -208,6 +208,6 @@ The Partner API is **additive-only within `/partner/v1`**. This gem is tagged wi
|
|
|
208
208
|
- Partner API reference: https://go.shedcloud.com/partner/reference
|
|
209
209
|
- Backend source of truth: `shedcloud-api-go/docs/PARTNER_API.md`
|
|
210
210
|
- TypeScript/JavaScript: [`@shedcloud/partner-api`](https://github.com/Corland-Partners-LLC/shedcloud-npm)
|
|
211
|
-
- Go: [`shedcloud-gomod/partnerapi`](https://github.com/Corland-Partners-LLC/shedcloud-gomod)
|
|
211
|
+
- Go: [`shedcloud-gomod/partnerapi`](https://pkg.go.dev/github.com/Corland-Partners-LLC/shedcloud-gomod/partnerapi)
|
|
212
212
|
- Python: [`shedcloud-partner-api`](https://github.com/Corland-Partners-LLC/shedcloud-pypi)
|
|
213
213
|
- PHP: [`shedcloud/partner-api`](https://github.com/Corland-Partners-LLC/shedcloud-php)
|
|
@@ -11,6 +11,7 @@ module ShedCloud
|
|
|
11
11
|
:orders,
|
|
12
12
|
:work_orders,
|
|
13
13
|
:locations,
|
|
14
|
+
:location_budgets,
|
|
14
15
|
:customers,
|
|
15
16
|
:domains,
|
|
16
17
|
:agreements,
|
|
@@ -50,6 +51,7 @@ module ShedCloud
|
|
|
50
51
|
@orders = Resources::Orders.new(@http)
|
|
51
52
|
@work_orders = Resources::WorkOrders.new(@http)
|
|
52
53
|
@locations = Resources::Locations.new(@http)
|
|
54
|
+
@location_budgets = Resources::LocationBudgets.new(@http)
|
|
53
55
|
@customers = Resources::Customers.new(@http)
|
|
54
56
|
@domains = Resources::Domains.new(@http)
|
|
55
57
|
@agreements = Resources::Agreements.new(@http)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ShedCloud
|
|
4
|
+
module PartnerApi
|
|
5
|
+
module Resources
|
|
6
|
+
class LocationBudgets < Base
|
|
7
|
+
def list(params = {})
|
|
8
|
+
@http.request('GET', '/partner/v1/location-budgets', query: params) || {}
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def get(id)
|
|
12
|
+
@http.request('GET', "/partner/v1/location-budgets/#{path_segment(id)}") || {}
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def create(body, options: nil)
|
|
16
|
+
@http.request(
|
|
17
|
+
'POST',
|
|
18
|
+
'/partner/v1/location-budgets',
|
|
19
|
+
body: body,
|
|
20
|
+
headers: option_headers(options),
|
|
21
|
+
) || {}
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def update(id, body)
|
|
25
|
+
@http.request('PUT', "/partner/v1/location-budgets/#{path_segment(id)}", body: body) || {}
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -14,6 +14,13 @@ module ShedCloud
|
|
|
14
14
|
# POST /partner/v1/site-events (scope partner-api.site-events.write).
|
|
15
15
|
# Unlike most Partner API endpoints, the ingest body natively speaks
|
|
16
16
|
# snake_case on the wire (session_id, visitor_id, events[].event_type, ...).
|
|
17
|
+
#
|
|
18
|
+
# Forward the end shopper's context via top-level client_ip and
|
|
19
|
+
# client_user_agent — without them every event is stamped with your
|
|
20
|
+
# server's IP/UA and visitor geo is meaningless. Identity events may
|
|
21
|
+
# carry events[].customer (first_name/last_name/email/phone/zip),
|
|
22
|
+
# events[].delivery (address), and events[].payment
|
|
23
|
+
# (payment_type "RENT_TO_OWN"|"CASH", monthly_term, ...) snapshots.
|
|
17
24
|
def track(body, options: nil)
|
|
18
25
|
@http.request('POST', '/partner/v1/site-events', body: body, headers: option_headers(options)) || {}
|
|
19
26
|
end
|
|
@@ -14,6 +14,8 @@ module ShedCloud
|
|
|
14
14
|
WORK_ORDERS_WRITE = 'partner-api.work-orders.write'
|
|
15
15
|
LOCATIONS_READ = 'partner-api.locations.read'
|
|
16
16
|
LOCATIONS_WRITE = 'partner-api.locations.write'
|
|
17
|
+
LOCATION_BUDGETS_READ = 'partner-api.location-budgets.read'
|
|
18
|
+
LOCATION_BUDGETS_WRITE = 'partner-api.location-budgets.write'
|
|
17
19
|
CUSTOMERS_READ = 'partner-api.customers.read'
|
|
18
20
|
CUSTOMERS_WRITE = 'partner-api.customers.write'
|
|
19
21
|
PRODUCTS_READ = 'partner-api.products.read'
|
|
@@ -43,6 +45,8 @@ module ShedCloud
|
|
|
43
45
|
WORK_ORDERS_WRITE,
|
|
44
46
|
LOCATIONS_READ,
|
|
45
47
|
LOCATIONS_WRITE,
|
|
48
|
+
LOCATION_BUDGETS_READ,
|
|
49
|
+
LOCATION_BUDGETS_WRITE,
|
|
46
50
|
CUSTOMERS_READ,
|
|
47
51
|
CUSTOMERS_WRITE,
|
|
48
52
|
PRODUCTS_READ,
|
|
@@ -18,6 +18,7 @@ require_relative 'partner_api/resources/quotes'
|
|
|
18
18
|
require_relative 'partner_api/resources/orders'
|
|
19
19
|
require_relative 'partner_api/resources/work_orders'
|
|
20
20
|
require_relative 'partner_api/resources/locations'
|
|
21
|
+
require_relative 'partner_api/resources/location_budgets'
|
|
21
22
|
require_relative 'partner_api/resources/customers'
|
|
22
23
|
require_relative 'partner_api/resources/domains'
|
|
23
24
|
require_relative 'partner_api/resources/agreements'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shedcloud-partner_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Corland Partners LLC
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -71,6 +71,7 @@ files:
|
|
|
71
71
|
- lib/shedcloud/partner_api/resources/domains.rb
|
|
72
72
|
- lib/shedcloud/partner_api/resources/events.rb
|
|
73
73
|
- lib/shedcloud/partner_api/resources/leads.rb
|
|
74
|
+
- lib/shedcloud/partner_api/resources/location_budgets.rb
|
|
74
75
|
- lib/shedcloud/partner_api/resources/locations.rb
|
|
75
76
|
- lib/shedcloud/partner_api/resources/lot_stock.rb
|
|
76
77
|
- lib/shedcloud/partner_api/resources/orders.rb
|