generated from NdoleStudio/go-http-client
-
Notifications
You must be signed in to change notification settings - Fork 16
/
customer.go
40 lines (35 loc) · 1.75 KB
/
customer.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"
// CustomerAttributes are the attributes of a lemonsqueezy customer
type CustomerAttributes struct {
StoreID int `json:"store_id"`
Name string `json:"name"`
Email string `json:"email"`
Status string `json:"status"`
City *string `json:"city"`
Region *string `json:"region"`
Country string `json:"country"`
TotalRevenueCurrency int `json:"total_revenue_currency"`
Mrr int `json:"mrr"`
StatusFormatted string `json:"status_formatted"`
CountryFormatted string `json:"country_formatted"`
TotalRevenueCurrencyFormatted string `json:"total_revenue_currency_formatted"`
MrrFormatted string `json:"mrr_formatted"`
Urls struct {
CustomerPortal string `json:"customer_portal"`
} `json:"urls"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
TestMode bool `json:"test_mode"`
}
// ApiResponseRelationshipsCustomer relationships of a customer
type ApiResponseRelationshipsCustomer struct {
Store ApiResponseLinks `json:"store"`
Subscriptions ApiResponseLinks `json:"subscriptions"`
Orders ApiResponseLinks `json:"orders"`
LicenseKeys ApiResponseLinks `json:"license-keys"`
}
// CustomerApiResponse represents a customer api response
type CustomerApiResponse = ApiResponse[CustomerAttributes, ApiResponseRelationshipsCustomer]
// CustomersApiResponse represents a list of customers api responses.
type CustomersApiResponse = ApiResponseList[CustomerAttributes, ApiResponseRelationshipsCustomer]