BillingAlerts
Create, update, delete, and query the Accounts you manage in Stripe.
Table Specific Information
Select
The 本製品 uses the Stripe API to filter the results by the following columns and operators:
- Id supports the following operator: =.
- AlertType supports the following operator: =.
- Meter supports the following operator: =.
The rest of the filter is executed client-side within the 本製品.
You can select from the BillingAlerts table with the following queries:
SELECT * FROM BillingAlerts; SELECT * FROM BillingAlerts WHERE Id = 'alrt_61StTIaW2Fbu9eu8g41ATXQzBWNrl3s8'; SELECT * FROM BillingAlerts WHERE AlertType = 'usage_threshold'; SELECT * FROM BillingAlerts WHERE Meter = 'mtr_61SsKmAO0UJqejE4X41ATXQzBWNrlL3A';
Insert
To create a new billing alert AlertType, Title, UsageThresholdGte, UsageThresholdMeter, UsageThresholdRecurrence, and UsageThresholdFilters are required.
INSERT INTO BillingAlerts(AlertType, Title, UsageThresholdGte, UsageThresholdMeter,UsageThresholdRecurrence,UsageThresholdFilters) values('usage_threshold','test by driver','55899','mtr_61SsKmAO0UJqejE4X41ATXQzBWNrlL3A','one_time','[{\"type\": \"customer\" , \"customer\":\"cus_PlAgkzgwf099eS\"}]')
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
Unique identifier for the object. | |
| Object | String | True |
String representing the object’s type. Objects of the same type share the same value. | |
| AlertType | String | False |
Defines the type of the alert. Use usage_threshold if you intend for an alert to fire when a usage threshold on a meter is crossed. 使用できる値は次のとおりです。usage_threshold | |
| Livemode | Boolean | True |
Has the value true if the object exists in live mode or the value false if the object exists in test mode. | |
| Status | String | True |
Status of the alert. This can be active, inactive or archived. 使用できる値は次のとおりです。active, inactive, archived | |
| Title | String | False |
Title of the alert. | |
| UsageThresholdFilters | String | False |
The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. Limit the scope of the alert to this customer ID | |
| UsageThresholdGte | Integer | False |
The value at which this alert will trigger. | |
| UsageThresholdMeterId | String | False |
The Billing Meter ID whose usage is monitored. | |
| UsageThresholdRecurrence | String | False |
Defines how the alert will behave. 使用できる値は次のとおりです。one_time |
Pseudo-Columns
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| Meter | String |
Filter results to only include alerts with the given meter. |