feat: add price, url, image, description, archived fields to Product struct
All checks were successful
Release / release (push) Successful in 24s
All checks were successful
Release / release (push) Successful in 24s
Extends the Product struct to include additional fields from the Snipcart Products API response, enabling filtering of archived products and access to product metadata like images and URLs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1
go.mod
1
go.mod
@@ -4,6 +4,5 @@ go 1.19
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/debyltech/go-helpers v1.1.1
|
github.com/debyltech/go-helpers v1.1.1
|
||||||
github.com/debyltech/go-shippr v0.1.0
|
|
||||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -167,6 +167,11 @@ type Product struct {
|
|||||||
Token string `json:"id"`
|
Token string `json:"id"`
|
||||||
Id string `json:"userDefinedId"`
|
Id string `json:"userDefinedId"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
Price float64 `json:"price"`
|
||||||
|
Url string `json:"url"`
|
||||||
|
Image string `json:"image"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
Archived bool `json:"archived"`
|
||||||
Stock int `json:"stock"`
|
Stock int `json:"stock"`
|
||||||
TotalStock int `json:"totalStock"`
|
TotalStock int `json:"totalStock"`
|
||||||
AllowBackorder bool `json:"allowOutOfStockPurchases"`
|
AllowBackorder bool `json:"allowOutOfStockPurchases"`
|
||||||
|
|||||||
Reference in New Issue
Block a user