forked from stripe/stripe-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update generated code for v1170 * Update generated code for v1171 * Update generated code for v1172 * Update generated code for v1173 * Update generated code for v1174 * Update generated code for v1175 * Update generated code for v1176 * Update generated code for v1177 * Update generated code for v1179 * Update generated code for v1180 * Update generated code for v1182 * Update generated code for v1183 * Update generated code for v1184 * Update generated code for v1186 * Update generated code for v1187 * Update generated code for v1188 * Update generated code for v1189 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
- Loading branch information
1 parent
92e32dc
commit 9f148ec
Showing
36 changed files
with
1,137 additions
and
824 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1169 | ||
v1189 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// File generated from our OpenAPI spec | ||
|
||
import {StripeResource} from '../../StripeResource.js'; | ||
const stripeMethod = StripeResource.method; | ||
export const Alerts = StripeResource.extend({ | ||
create: stripeMethod({method: 'POST', fullPath: '/v1/billing/alerts'}), | ||
retrieve: stripeMethod({method: 'GET', fullPath: '/v1/billing/alerts/{id}'}), | ||
list: stripeMethod({ | ||
method: 'GET', | ||
fullPath: '/v1/billing/alerts', | ||
methodType: 'list', | ||
}), | ||
activate: stripeMethod({ | ||
method: 'POST', | ||
fullPath: '/v1/billing/alerts/{id}/activate', | ||
}), | ||
archive: stripeMethod({ | ||
method: 'POST', | ||
fullPath: '/v1/billing/alerts/{id}/archive', | ||
}), | ||
deactivate: stripeMethod({ | ||
method: 'POST', | ||
fullPath: '/v1/billing/alerts/{id}/deactivate', | ||
}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
// File generated from our OpenAPI spec | ||
|
||
declare module 'stripe' { | ||
namespace Stripe { | ||
namespace Billing { | ||
interface AlertCreateParams { | ||
/** | ||
* The type of alert to create. | ||
*/ | ||
alert_type: 'usage_threshold'; | ||
|
||
/** | ||
* The title of the alert. | ||
*/ | ||
title: string; | ||
|
||
/** | ||
* Specifies which fields in the response should be expanded. | ||
*/ | ||
expand?: Array<string>; | ||
|
||
/** | ||
* Filters to limit the scope of an alert. | ||
*/ | ||
filter?: AlertCreateParams.Filter; | ||
|
||
/** | ||
* The configuration of the usage threshold. | ||
*/ | ||
usage_threshold_config?: AlertCreateParams.UsageThresholdConfig; | ||
} | ||
|
||
namespace AlertCreateParams { | ||
interface Filter { | ||
/** | ||
* Limit the scope to this alert only to this customer. | ||
*/ | ||
customer?: string; | ||
} | ||
|
||
interface UsageThresholdConfig { | ||
/** | ||
* Defines at which value the alert will fire. | ||
*/ | ||
gte: number; | ||
|
||
/** | ||
* The [Billing Meter](https://stripe.com/api/billing/meter) ID whose usage is monitored. | ||
*/ | ||
meter?: string; | ||
|
||
/** | ||
* Whether the alert should only fire only once, or once per billing cycle. | ||
*/ | ||
recurrence: 'one_time'; | ||
} | ||
} | ||
|
||
interface AlertRetrieveParams { | ||
/** | ||
* Specifies which fields in the response should be expanded. | ||
*/ | ||
expand?: Array<string>; | ||
} | ||
|
||
interface AlertListParams extends PaginationParams { | ||
/** | ||
* Filter results to only include this type of alert. | ||
*/ | ||
alert_type?: 'usage_threshold'; | ||
|
||
/** | ||
* Specifies which fields in the response should be expanded. | ||
*/ | ||
expand?: Array<string>; | ||
|
||
/** | ||
* Filter results to only include alerts with the given meter. | ||
*/ | ||
meter?: string; | ||
} | ||
|
||
interface AlertActivateParams { | ||
/** | ||
* Specifies which fields in the response should be expanded. | ||
*/ | ||
expand?: Array<string>; | ||
} | ||
|
||
interface AlertArchiveParams { | ||
/** | ||
* Specifies which fields in the response should be expanded. | ||
*/ | ||
expand?: Array<string>; | ||
} | ||
|
||
interface AlertDeactivateParams { | ||
/** | ||
* Specifies which fields in the response should be expanded. | ||
*/ | ||
expand?: Array<string>; | ||
} | ||
|
||
class AlertsResource { | ||
/** | ||
* Creates a billing alert | ||
*/ | ||
create( | ||
params: AlertCreateParams, | ||
options?: RequestOptions | ||
): Promise<Stripe.Response<Stripe.Billing.Alert>>; | ||
|
||
/** | ||
* Retrieves a billing alert given an ID | ||
*/ | ||
retrieve( | ||
id: string, | ||
params?: AlertRetrieveParams, | ||
options?: RequestOptions | ||
): Promise<Stripe.Response<Stripe.Billing.Alert>>; | ||
retrieve( | ||
id: string, | ||
options?: RequestOptions | ||
): Promise<Stripe.Response<Stripe.Billing.Alert>>; | ||
|
||
/** | ||
* Lists billing active and inactive alerts | ||
*/ | ||
list( | ||
params?: AlertListParams, | ||
options?: RequestOptions | ||
): ApiListPromise<Stripe.Billing.Alert>; | ||
list(options?: RequestOptions): ApiListPromise<Stripe.Billing.Alert>; | ||
|
||
/** | ||
* Reactivates this alert, allowing it to trigger again. | ||
*/ | ||
activate( | ||
id: string, | ||
params?: AlertActivateParams, | ||
options?: RequestOptions | ||
): Promise<Stripe.Response<Stripe.Billing.Alert>>; | ||
activate( | ||
id: string, | ||
options?: RequestOptions | ||
): Promise<Stripe.Response<Stripe.Billing.Alert>>; | ||
|
||
/** | ||
* Archives this alert, removing it from the list view and APIs. This is non-reversible. | ||
*/ | ||
archive( | ||
id: string, | ||
params?: AlertArchiveParams, | ||
options?: RequestOptions | ||
): Promise<Stripe.Response<Stripe.Billing.Alert>>; | ||
archive( | ||
id: string, | ||
options?: RequestOptions | ||
): Promise<Stripe.Response<Stripe.Billing.Alert>>; | ||
|
||
/** | ||
* Deactivates this alert, preventing it from triggering. | ||
*/ | ||
deactivate( | ||
id: string, | ||
params?: AlertDeactivateParams, | ||
options?: RequestOptions | ||
): Promise<Stripe.Response<Stripe.Billing.Alert>>; | ||
deactivate( | ||
id: string, | ||
options?: RequestOptions | ||
): Promise<Stripe.Response<Stripe.Billing.Alert>>; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.