Skip to content

Commit

Permalink
misc: Remove *_count fields (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pochet authored Dec 10, 2024
1 parent 3b61d6c commit ec5ecbc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 34 deletions.
29 changes: 13 additions & 16 deletions billable_metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,19 @@ type BillableMetricFilter struct {
}

type BillableMetric struct {
LagoID uuid.UUID `json:"lago_id"`
Name string `json:"name,omitempty"`
Code string `json:"code,omitempty"`
Description string `json:"description,omitempty"`
Recurring bool `json:"recurring,omitempty"`
RoundingFunction *RoundingFunction `json:"rounding_function,omitempty"`
RoundingPrecision *int `json:"rounding_precision,omitempty"`
AggregationType AggregationType `json:"aggregation_type,omitempty"`
Expression string `json:"expression,omitempty"`
FieldName string `json:"field_name"`
CreatedAt time.Time `json:"created_at,omitempty"`
WeightedInterval *WeightedInterval `json:"weighted_interval,omitempty"`
Filters []BillableMetricFilter `json:"filters,omitempty"`
ActiveSubscriptionsCount int `json:"active_subscriptions_count,omitempty"`
DraftInvoicesCount int `json:"draft_invoices_count,omitempty"`
PlansCount int `json:"plans_count,omitempty"`
LagoID uuid.UUID `json:"lago_id"`
Name string `json:"name,omitempty"`
Code string `json:"code,omitempty"`
Description string `json:"description,omitempty"`
Recurring bool `json:"recurring,omitempty"`
RoundingFunction *RoundingFunction `json:"rounding_function,omitempty"`
RoundingPrecision *int `json:"rounding_precision,omitempty"`
AggregationType AggregationType `json:"aggregation_type,omitempty"`
Expression string `json:"expression,omitempty"`
FieldName string `json:"field_name"`
CreatedAt time.Time `json:"created_at,omitempty"`
WeightedInterval *WeightedInterval `json:"weighted_interval,omitempty"`
Filters []BillableMetricFilter `json:"filters,omitempty"`
}

type BillableMetricEveluateExpressionEvent struct {
Expand Down
26 changes: 12 additions & 14 deletions plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,18 @@ type MinimumCommitment struct {
}

type Plan struct {
LagoID uuid.UUID `json:"lago_id"`
Name string `json:"name,omitempty"`
InvoiceDisplayName string `json:"invoice_display_name,omitempty"`
Code string `json:"code,omitempty"`
Interval PlanInterval `json:"interval,omitempty"`
Description string `json:"description,omitempty"`
AmountCents int `json:"amount_cents,omitempty"`
AmountCurrency Currency `json:"amount_currency,omitempty"`
PayInAdvance bool `json:"pay_in_advance,omitempty"`
BillChargeMonthly bool `json:"bill_charge_monthly,omitempty"`
ActiveSubscriptionsCount int `json:"active_subscriptions_count,omitempty"`
DraftInvoicesCount int `json:"draft_invoices_count,omitempty"`
Charges []Charge `json:"charges,omitempty"`
MinimumCommitment *MinimumCommitment `json:"minimum_commitment"`
LagoID uuid.UUID `json:"lago_id"`
Name string `json:"name,omitempty"`
InvoiceDisplayName string `json:"invoice_display_name,omitempty"`
Code string `json:"code,omitempty"`
Interval PlanInterval `json:"interval,omitempty"`
Description string `json:"description,omitempty"`
AmountCents int `json:"amount_cents,omitempty"`
AmountCurrency Currency `json:"amount_currency,omitempty"`
PayInAdvance bool `json:"pay_in_advance,omitempty"`
BillChargeMonthly bool `json:"bill_charge_monthly,omitempty"`
Charges []Charge `json:"charges,omitempty"`
MinimumCommitment *MinimumCommitment `json:"minimum_commitment"`

Taxes []Tax `json:"taxes,omitempty"`
UsageThresholds []UsageThreshold `json:"usage_thresholds,omitempty"`
Expand Down
4 changes: 0 additions & 4 deletions tax.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ type Tax struct {
Code string `json:"code,omitempty"`
Rate float32 `json:"rate,omitempty"`
Description string `json:"description,omitempty"`
AddOnsCount int `json:"add_ons_count,omitempty"`
CustomersCount int `json:"customers_count,omitempty"`
PlansCount int `json:"plans_count,omitempty"`
ChargesCount int `json:"charges_count,omitempty"`
AppliedToOrganization bool `json:"applied_to_organization,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
}
Expand Down

0 comments on commit ec5ecbc

Please sign in to comment.