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

misc: Remove *_count fields #216

Merged
merged 1 commit into from
Dec 10, 2024
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
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