generated from NdoleStudio/go-http-client
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathlicense_key.go
40 lines (35 loc) · 1.83 KB
/
license_key.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
38
39
40
package lemonsqueezy
import "time"
// LicenseKeyAttributes contains information about a license key which can be used to externally verify that customer has access to a product.
type LicenseKeyAttributes struct {
StoreID int `json:"store_id"`
CustomerID int `json:"customer_id"`
OrderID int `json:"order_id"`
OrderItemID int `json:"order_item_id"`
ProductID int `json:"product_id"`
UserName string `json:"user_name"`
UserEmail string `json:"user_email"`
Key string `json:"key"`
KeyShort string `json:"key_short"`
ActivationLimit int `json:"activation_limit"`
InstancesCount int `json:"instances_count"`
Disabled bool `json:"disabled"`
Status string `json:"status"`
StatusFormatted string `json:"status_formatted"`
ExpiresAt interface{} `json:"expires_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
// ApiResponseRelationshipsLicenseKey relationships of a license key
type ApiResponseRelationshipsLicenseKey struct {
Store ApiResponseLinks `json:"store"`
Customer ApiResponseLinks `json:"customer"`
Order ApiResponseLinks `json:"order"`
OrderItem ApiResponseLinks `json:"order-item"`
Product ApiResponseLinks `json:"product"`
LicenseKeyInstances ApiResponseLinks `json:"license-key-instances"`
}
// LicenseKeyApiResponse is the api response for one subscription invoice
type LicenseKeyApiResponse = ApiResponse[LicenseKeyAttributes, ApiResponseRelationshipsLicenseKey]
// LicenseKeysApiResponse is the api response for a list of subscription invoices.
type LicenseKeysApiResponse = ApiResponseList[LicenseKeyAttributes, ApiResponseRelationshipsLicenseKey]