Skip to content

Commit 2f65773

Browse files
authored
Merge pull request #28 from iamolegga/main
Add product's missing `formatted` fields
2 parents 9949182 + 0a82c64 commit 2f65773

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

product.go

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,24 @@ import "time"
44

55
// ProductAttributes are the attributes of a lemonsqueezy product
66
type ProductAttributes struct {
7-
StoreID int `json:"store_id"`
8-
Name string `json:"name"`
9-
Slug string `json:"slug"`
10-
Description string `json:"description"`
11-
Status string `json:"status"`
12-
StatusFormatted string `json:"status_formatted"`
13-
ThumbURL string `json:"thumb_url"`
14-
LargeThumbURL string `json:"large_thumb_url"`
15-
Price any `json:"price"`
16-
PayWhatYouWant bool `json:"pay_what_you_want"`
17-
FromPrice *int `json:"from_price"`
18-
ToPrice *int `json:"to_price"`
19-
BuyNowURL string `json:"buy_now_url"`
20-
PriceFormatted string `json:"price_formatted"`
21-
CreatedAt time.Time `json:"created_at"`
22-
UpdatedAt time.Time `json:"updated_at"`
7+
StoreID int `json:"store_id"`
8+
Name string `json:"name"`
9+
Slug string `json:"slug"`
10+
Description string `json:"description"`
11+
Status string `json:"status"`
12+
StatusFormatted string `json:"status_formatted"`
13+
ThumbURL string `json:"thumb_url"`
14+
LargeThumbURL string `json:"large_thumb_url"`
15+
Price any `json:"price"`
16+
PayWhatYouWant bool `json:"pay_what_you_want"`
17+
FromPrice *int `json:"from_price"`
18+
FromPriceFormatted *string `json:"from_price_formatted"`
19+
ToPrice *int `json:"to_price"`
20+
ToPriceFormatted *string `json:"to_price_formatted"`
21+
BuyNowURL string `json:"buy_now_url"`
22+
PriceFormatted string `json:"price_formatted"`
23+
CreatedAt time.Time `json:"created_at"`
24+
UpdatedAt time.Time `json:"updated_at"`
2325
}
2426

2527
// ApiResponseRelationshipsProduct relationships of a product

0 commit comments

Comments
 (0)