Skip to content

Commit

Permalink
Update OpenAPI specification
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Aug 30, 2024
1 parent 0c76bbc commit 518c89c
Show file tree
Hide file tree
Showing 6 changed files with 540 additions and 0 deletions.
95 changes: 95 additions & 0 deletions openapi/spec3.beta.sdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -4380,6 +4380,7 @@
"alert_type": {
"description": "Defines the type of the alert.",
"enum": [
"spend_threshold",
"usage_threshold"
],
"type": "string"
Expand Down Expand Up @@ -4409,6 +4410,15 @@
],
"type": "string"
},
"spend_threshold_config": {
"anyOf": [
{
"$ref": "#/components/schemas/thresholds_resource_spend_threshold_config"
}
],
"description": "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).",
"nullable": true
},
"status": {
"description": "Status of the alert. This can be active, inactive or archived.",
"enum": [
Expand Down Expand Up @@ -4448,6 +4458,7 @@
"type": "object",
"x-expandableFields": [
"filter",
"spend_threshold_config",
"usage_threshold_config"
],
"x-resourceId": "billing.alert",
Expand Down Expand Up @@ -69227,6 +69238,44 @@
"customer"
]
},
"thresholds_resource_spend_threshold_config": {
"description": "The spend threshold alert configuration enables setting up alerts for when a certain spend threshold on a specific subscription or subscription item is crossed.",
"properties": {
"aggregation": {
"description": "Defines if the alert will fire on spend aggregated across a subscription, or on individual subscription items.",
"enum": [
"subscription",
"subscription_item"
],
"type": "string"
},
"currency": {
"description": "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).",
"type": "string"
},
"gte": {
"description": "The value at which this alert will trigger.",
"type": "integer"
},
"recurrence": {
"description": "Defines how the alert will behave.",
"enum": [
"one_time"
],
"type": "string",
"x-stripeBypassValidation": true
}
},
"required": [
"aggregation",
"currency",
"gte",
"recurrence"
],
"title": "ThresholdsResourceSpendThresholdConfig",
"type": "object",
"x-expandableFields": []
},
"thresholds_resource_usage_threshold_config": {
"description": "The usage threshold alert configuration enables setting up alerts for when a certain usage threshold on a specific meter is crossed.",
"properties": {
Expand Down Expand Up @@ -86830,6 +86879,7 @@
"required": false,
"schema": {
"enum": [
"spend_threshold",
"usage_threshold"
],
"type": "string",
Expand Down Expand Up @@ -86988,6 +87038,10 @@
"explode": true,
"style": "deepObject"
},
"spend_threshold_config": {
"explode": true,
"style": "deepObject"
},
"usage_threshold_config": {
"explode": true,
"style": "deepObject"
Expand All @@ -86999,6 +87053,7 @@
"alert_type": {
"description": "The type of alert to create.",
"enum": [
"spend_threshold",
"usage_threshold"
],
"type": "string"
Expand Down Expand Up @@ -87029,6 +87084,46 @@
"most_common": true
}
},
"spend_threshold_config": {
"description": "The configuration of the spend threshold.",
"properties": {
"aggregation": {
"description": "Whether the spend should be aggregated across items in a subscription or whether each subscription item is considered alone.",
"enum": [
"subscription",
"subscription_item"
],
"type": "string"
},
"currency": {
"description": "Currency for which this spend alert is configured. This alert will only trigger for subscriptions matching this currency.",
"type": "string"
},
"gte": {
"description": "Defines at which value the alert will fire.",
"type": "integer"
},
"recurrence": {
"description": "Whether the alert should only fire only once, or once per billing cycle.",
"enum": [
"one_time"
],
"type": "string",
"x-stripeBypassValidation": true
}
},
"required": [
"aggregation",
"currency",
"gte",
"recurrence"
],
"title": "spend_threshold_config",
"type": "object",
"x-stripeParam": {
"most_common": true
}
},
"title": {
"description": "The title of the alert.",
"maxLength": 256,
Expand Down
92 changes: 92 additions & 0 deletions openapi/spec3.beta.sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4185,6 +4185,7 @@ components:
alert_type:
description: Defines the type of the alert.
enum:
- spend_threshold
- usage_threshold
type: string
filter:
Expand All @@ -4210,6 +4211,15 @@ components:
enum:
- billing.alert
type: string
spend_threshold_config:
anyOf:
- $ref: '#/components/schemas/thresholds_resource_spend_threshold_config'
description: >-
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).
nullable: true
status:
description: 'Status of the alert. This can be active, inactive or archived.'
enum:
Expand Down Expand Up @@ -4242,6 +4252,7 @@ components:
type: object
x-expandableFields:
- filter
- spend_threshold_config
- usage_threshold_config
x-resourceId: billing.alert
x-stripeOperations:
Expand Down Expand Up @@ -63046,6 +63057,44 @@ components:
type: object
x-expandableFields:
- customer
thresholds_resource_spend_threshold_config:
description: >-
The spend threshold alert configuration enables setting up alerts for
when a certain spend threshold on a specific subscription or
subscription item is crossed.
properties:
aggregation:
description: >-
Defines if the alert will fire on spend aggregated across a
subscription, or on individual subscription items.
enum:
- subscription
- subscription_item
type: string
currency:
description: >-
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).
type: string
gte:
description: The value at which this alert will trigger.
type: integer
recurrence:
description: Defines how the alert will behave.
enum:
- one_time
type: string
x-stripeBypassValidation: true
required:
- aggregation
- currency
- gte
- recurrence
title: ThresholdsResourceSpendThresholdConfig
type: object
x-expandableFields: []
thresholds_resource_usage_threshold_config:
description: >-
The usage threshold alert configuration enables setting up alerts for
Expand Down Expand Up @@ -78807,6 +78856,7 @@ paths:
required: false
schema:
enum:
- spend_threshold
- usage_threshold
type: string
x-stripeParam:
Expand Down Expand Up @@ -78934,6 +78984,9 @@ paths:
filter:
explode: true
style: deepObject
spend_threshold_config:
explode: true
style: deepObject
usage_threshold_config:
explode: true
style: deepObject
Expand All @@ -78943,6 +78996,7 @@ paths:
alert_type:
description: The type of alert to create.
enum:
- spend_threshold
- usage_threshold
type: string
expand:
Expand All @@ -78964,6 +79018,44 @@ paths:
type: object
x-stripeParam:
most_common: true
spend_threshold_config:
description: The configuration of the spend threshold.
properties:
aggregation:
description: >-
Whether the spend should be aggregated across items in a
subscription or whether each subscription item is
considered alone.
enum:
- subscription
- subscription_item
type: string
currency:
description: >-
Currency for which this spend alert is configured. This
alert will only trigger for subscriptions matching this
currency.
type: string
gte:
description: Defines at which value the alert will fire.
type: integer
recurrence:
description: >-
Whether the alert should only fire only once, or once
per billing cycle.
enum:
- one_time
type: string
x-stripeBypassValidation: true
required:
- aggregation
- currency
- gte
- recurrence
title: spend_threshold_config
type: object
x-stripeParam:
most_common: true
title:
description: The title of the alert.
maxLength: 256
Expand Down
Loading

0 comments on commit 518c89c

Please sign in to comment.