Skip to content

Commit

Permalink
add support for prorated and recurring fields (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
lovrocolic authored Jul 28, 2023
1 parent 3a39f4b commit 6d3f0bd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
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 @@ -24,6 +24,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

0 comments on commit 6d3f0bd

Please sign in to comment.