generated from NdoleStudio/go-http-client
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathfile.go
30 lines (25 loc) · 1.11 KB
/
file.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package lemonsqueezy
import "time"
// FileAttributes represents a digital good that can be downloaded by a customer after the product has been purchased.
type FileAttributes struct {
VariantID int `json:"variant_id"`
Identifier string `json:"identifier"`
Name string `json:"name"`
Extension string `json:"extension"`
DownloadURL string `json:"download_url"`
Size int `json:"size"`
SizeFormatted string `json:"size_formatted"`
Version string `json:"version"`
Sort int `json:"sort"`
Status string `json:"status"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
// ApiResponseRelationshipsFile relationships of a file
type ApiResponseRelationshipsFile struct {
Variant ApiResponseLinks `json:"variant"`
}
// FileApiResponse is the api response for one file
type FileApiResponse = ApiResponse[FileAttributes, ApiResponseRelationshipsFile]
// FilesApiResponse is the api response for a list of files.
type FilesApiResponse = ApiResponseList[FileAttributes, ApiResponseRelationshipsFile]