Skip to content

Commit

Permalink
feat(ProgressiveBilling): Expose applied usage threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pochet committed Aug 29, 2024
1 parent a1c8633 commit 34e63fc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lago_python_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
from .subscription import Subscription
from .customer_usage import Metric, ChargeObject, ChargeUsage, CustomerUsageResponse
from .tax import Tax, Taxes, TaxResponse, TaxesResponse
from .usage_threshold import UsageThreshold, UsageThresholds, UsageThresholdResponse, UsageThresholdsResponse
from .usage_threshold import UsageThreshold, UsageThresholds, UsageThresholdResponse, \
UsageThresholdsResponse, AppliedUsageThresholdResponse, AppliedUsageThresholdsResponse
from .wallet import Wallet, RecurringTransactionRule, RecurringTransactionRuleList, \
RecurringTransactionRuleResponse, RecurringTransactionRuleResponseList
from .wallet_transaction import WalletTransaction
Expand Down
2 changes: 2 additions & 0 deletions lago_python_client/models/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from .customer import CustomerResponse
from .fee import FeesResponse
from .subscription import SubscriptionsResponse
from .usage_threshold import AppliedUsageThresholdsResponse
from ..base_model import BaseResponseModel


Expand Down Expand Up @@ -96,3 +97,4 @@ class InvoiceResponse(BaseResponseModel):
credits: Optional[CreditsResponse]
metadata: Optional[InvoiceMetadataList]
applied_taxes: Optional[InvoiceAppliedTaxes]
applied_usage_thresholds: Optional[AppliedUsageThresholdsResponse]
10 changes: 10 additions & 0 deletions lago_python_client/models/usage_threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,13 @@ class UsageThresholdResponse(BaseResponseModel):

class UsageThresholdsResponse(BaseResponseModel):
__root__: List[UsageThresholdResponse]


class AppliedUsageThresholdResponse(BaseResponseModel):
lifetime_usage_amount_cents: int
created_at: str
usage_threshold: UsageThresholdResponse


class AppliedUsageThresholdsResponse(BaseResponseModel):
__root__: List[AppliedUsageThresholdResponse]

0 comments on commit 34e63fc

Please sign in to comment.