From 0a82c64a02018a30ae09f4310df04ee6abbbaae1 Mon Sep 17 00:00:00 2001 From: iamolegga Date: Tue, 22 Oct 2024 17:12:44 +0300 Subject: [PATCH] Add product's missing `formatted` fields --- product.go | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/product.go b/product.go index 8658314..d42e9eb 100644 --- a/product.go +++ b/product.go @@ -4,22 +4,24 @@ import "time" // ProductAttributes are the attributes of a lemonsqueezy product type ProductAttributes struct { - StoreID int `json:"store_id"` - Name string `json:"name"` - Slug string `json:"slug"` - Description string `json:"description"` - Status string `json:"status"` - StatusFormatted string `json:"status_formatted"` - ThumbURL string `json:"thumb_url"` - LargeThumbURL string `json:"large_thumb_url"` - Price any `json:"price"` - PayWhatYouWant bool `json:"pay_what_you_want"` - FromPrice *int `json:"from_price"` - ToPrice *int `json:"to_price"` - BuyNowURL string `json:"buy_now_url"` - PriceFormatted string `json:"price_formatted"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + StoreID int `json:"store_id"` + Name string `json:"name"` + Slug string `json:"slug"` + Description string `json:"description"` + Status string `json:"status"` + StatusFormatted string `json:"status_formatted"` + ThumbURL string `json:"thumb_url"` + LargeThumbURL string `json:"large_thumb_url"` + Price any `json:"price"` + PayWhatYouWant bool `json:"pay_what_you_want"` + FromPrice *int `json:"from_price"` + FromPriceFormatted *string `json:"from_price_formatted"` + ToPrice *int `json:"to_price"` + ToPriceFormatted *string `json:"to_price_formatted"` + BuyNowURL string `json:"buy_now_url"` + PriceFormatted string `json:"price_formatted"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } // ApiResponseRelationshipsProduct relationships of a product