forked from NdoleStudio/lemonsqueezy-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlicense_key_instance.go
23 lines (18 loc) · 1.02 KB
/
license_key_instance.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package lemonsqueezy
import "time"
// LicenseKeyInstanceAttributes represents a single instance (or activation) of a license key that has been issued to a customer.
type LicenseKeyInstanceAttributes struct {
LicenseKeyID int `json:"license_key_id"`
Identifier string `json:"identifier"`
Name string `json:"name"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
// ApiResponseRelationshipsLicenseKeyInstance relationships of a license key
type ApiResponseRelationshipsLicenseKeyInstance struct {
LicenseKey ApiResponseLinks `json:"license-key"`
}
// LicenseKeyInstanceApiResponse is the api response for one subscription invoice
type LicenseKeyInstanceApiResponse = ApiResponse[LicenseKeyInstanceAttributes, ApiResponseRelationshipsLicenseKeyInstance]
// LicenseKeyInstancesApiResponse is the api response for a list of subscription invoices.
type LicenseKeyInstancesApiResponse = ApiResponseList[LicenseKeyInstanceAttributes, ApiResponseRelationshipsLicenseKeyInstance]