Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat (aggregation): add support for prorated and recurring fields #110

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions billable_metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type BillableMetricInput struct {
Code string `json:"code,omitempty"`
Description string `json:"description,omitempty"`
AggregationType AggregationType `json:"aggregation_type,omitempty"`
Recurring bool `json:"recurring,omitempty"`
FieldName string `json:"field_name"`
Group map[string]interface{} `json:"group,omitempty"`
}
Expand All @@ -52,6 +53,7 @@ type BillableMetric struct {
Name string `json:"name,omitempty"`
Code string `json:"code,omitempty"`
Description string `json:"description,omitempty"`
Recurring bool `json:"recurring,omitempty"`
AggregationType AggregationType `json:"aggregation_type,omitempty"`
FieldName string `json:"field_name"`
CreatedAt time.Time `json:"created_at,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type Charge struct {
CreatedAt time.Time `json:"created_at,omitempty"`
PayInAdvance bool `json:"pay_in_advance,omitempty"`
Invoiceable bool `json:"invoiceable,omitempty"`
Prorated bool `json:"prorated,omitempty"`
MinAmountCents int `json:"min_amount_cents,omitempty"`
Properties map[string]interface{} `json:"properties,omitempty"`
GroupProperties []GroupProperties `json:"group_properties,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type PlanChargeInput struct {
ChargeModel ChargeModel `json:"charge_model,omitempty"`
PayInAdvance bool `json:"pay_in_advance,omitempty"`
Invoiceable bool `json:"invoiceable,omitempty"`
Prorated bool `json:"prorated,omitempty"`
MinAmountCents int `json:"min_amount_cents,omitempty"`
Properties map[string]interface{} `json:"properties"`
GroupProperties []GroupProperties `json:"group_properties,omitempty"`
Expand Down