Skip to content

Commit

Permalink
Merge pull request #28 from iamolegga/main
Browse files Browse the repository at this point in the history
Add product's missing `formatted` fields
  • Loading branch information
AchoArnold authored Oct 22, 2024
2 parents 9949182 + 0a82c64 commit 2f65773
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions product.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f65773

Please sign in to comment.