generated from NdoleStudio/go-http-client
-
Notifications
You must be signed in to change notification settings - Fork 16
/
store.go
37 lines (32 loc) · 1.47 KB
/
store.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
31
32
33
34
35
36
37
package lemonsqueezy
import "time"
// StoreAttributes Everything in Lemon Squeezy belongs to a store.
type StoreAttributes struct {
Name string `json:"name"`
Slug string `json:"slug"`
Domain string `json:"domain"`
Url string `json:"url"`
AvatarUrl string `json:"avatar_url"`
Plan string `json:"plan"`
Country string `json:"country"`
CountryNiceName string `json:"country_nicename"`
Currency string `json:"currency"`
TotalSales int `json:"total_sales"`
TotalRevenue int `json:"total_revenue"`
ThirtyDaySales int `json:"thirty_day_sales"`
ThirtyDayRevenue int `json:"thirty_day_revenue"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
// ApiResponseRelationshipsStore relationships of a store object
type ApiResponseRelationshipsStore struct {
Subscriptions ApiResponseLinks `json:"subscriptions"`
Orders ApiResponseLinks `json:"orders"`
Products ApiResponseLinks `json:"products"`
LicenseKeys ApiResponseLinks `json:"license-keys"`
Discounts ApiResponseLinks `json:"discounts"`
}
// StoreApiResponse represents a store api response
type StoreApiResponse = ApiResponse[StoreAttributes, ApiResponseRelationshipsStore]
// StoresApiResponse represents a list of store api responses.
type StoresApiResponse = ApiResponseList[StoreAttributes, ApiResponseRelationshipsStore]