Skip to content

Commit

Permalink
Update generated code for v1244
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Sep 4, 2024
1 parent 59cd35a commit c983a08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 47 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1243
v1244
46 changes: 0 additions & 46 deletions billing_alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,9 @@ type BillingAlertAlertType string

// List of values that BillingAlertAlertType can take
const (
BillingAlertAlertTypeSpendThreshold BillingAlertAlertType = "spend_threshold"
BillingAlertAlertTypeUsageThreshold BillingAlertAlertType = "usage_threshold"
)

// Defines if the alert will fire on spend aggregated across a subscription, or on individual subscription items.
type BillingAlertSpendThresholdConfigAggregation string

// List of values that BillingAlertSpendThresholdConfigAggregation can take
const (
BillingAlertSpendThresholdConfigAggregationSubscription BillingAlertSpendThresholdConfigAggregation = "subscription"
BillingAlertSpendThresholdConfigAggregationSubscriptionItem BillingAlertSpendThresholdConfigAggregation = "subscription_item"
)

// Defines how the alert will behave.
type BillingAlertSpendThresholdConfigRecurrence string

// List of values that BillingAlertSpendThresholdConfigRecurrence can take
const (
BillingAlertSpendThresholdConfigRecurrenceOneTime BillingAlertSpendThresholdConfigRecurrence = "one_time"
)

// Status of the alert. This can be active, inactive or archived.
type BillingAlertStatus string

Expand Down Expand Up @@ -72,18 +54,6 @@ type BillingAlertFilterParams struct {
Customer *string `form:"customer"`
}

// The configuration of the spend threshold.
type BillingAlertSpendThresholdConfigParams struct {
// Whether the spend should be aggregated across items in a subscription or whether each subscription item is considered alone.
Aggregation *string `form:"aggregation"`
// Currency for which this spend alert is configured. This alert will only trigger for subscriptions matching this currency.
Currency *string `form:"currency"`
// Defines at which value the alert will fire.
GTE *int64 `form:"gte"`
// Whether the alert should only fire only once, or once per billing cycle.
Recurrence *string `form:"recurrence"`
}

// The configuration of the usage threshold.
type BillingAlertUsageThresholdConfigParams struct {
// Defines at which value the alert will fire.
Expand All @@ -103,8 +73,6 @@ type BillingAlertParams struct {
Expand []*string `form:"expand"`
// Filters to limit the scope of an alert.
Filter *BillingAlertFilterParams `form:"filter"`
// The configuration of the spend threshold.
SpendThresholdConfig *BillingAlertSpendThresholdConfigParams `form:"spend_threshold_config"`
// The title of the alert.
Title *string `form:"title"`
// The configuration of the usage threshold.
Expand Down Expand Up @@ -158,18 +126,6 @@ type BillingAlertFilter struct {
Customer *Customer `json:"customer"`
}

// Encapsulates configuration of the spend to monitoring spend on a [Subscription](https://stripe.com/docs/api/subscriptions/object) or [Subscription item](https://stripe.com/docs/api/subscription_items/object).
type BillingAlertSpendThresholdConfig struct {
// Defines if the alert will fire on spend aggregated across a subscription, or on individual subscription items.
Aggregation BillingAlertSpendThresholdConfigAggregation `json:"aggregation"`
// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
Currency Currency `json:"currency"`
// The value at which this alert will trigger.
GTE int64 `json:"gte"`
// Defines how the alert will behave.
Recurrence BillingAlertSpendThresholdConfigRecurrence `json:"recurrence"`
}

// Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter).
type BillingAlertUsageThresholdConfig struct {
// The value at which this alert will trigger.
Expand All @@ -193,8 +149,6 @@ type BillingAlert struct {
Livemode bool `json:"livemode"`
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
// Encapsulates configuration of the spend to monitoring spend on a [Subscription](https://stripe.com/docs/api/subscriptions/object) or [Subscription item](https://stripe.com/docs/api/subscription_items/object).
SpendThresholdConfig *BillingAlertSpendThresholdConfig `json:"spend_threshold_config"`
// Status of the alert. This can be active, inactive or archived.
Status BillingAlertStatus `json:"status"`
// Title of the alert.
Expand Down

0 comments on commit c983a08

Please sign in to comment.