-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathcharge.go
31 lines (25 loc) · 998 Bytes
/
charge.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
package lago
import (
"time"
"github.com/google/uuid"
)
type ChargeModel string
const (
StandardChargeModel ChargeModel = "standard"
GraduatedChargeModel ChargeModel = "graduated"
PackageChargeModel ChargeModel = "package"
PercentageChargeModel ChargeModel = "percentage"
)
type Charge struct {
LagoID uuid.UUID `json:"lago_id,omitempty"`
LagoBillableMetricID uuid.UUID `json:"lago_billable_metric_id,omitempty"`
BillableMetricCode string `json:"billable_metric_code,omitempty"`
ChargeModel ChargeModel `json:"charge_model,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
Properties map[string]interface{} `json:"properties,omitempty"`
GroupProperties []GroupProperties `json:"group_properties,omitempty"`
}
type GroupProperties struct {
GroupId uuid.UUID `json:"group_id"`
Values map[string]interface{} `json:"values"`
}