Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into sdk-release/next-major
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-stripe committed Mar 29, 2024
2 parents 0e89ca4 + e0e084c commit 042fe38
Show file tree
Hide file tree
Showing 40 changed files with 2,672 additions and 1,606 deletions.
3,481 changes: 1,906 additions & 1,575 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion OPENAPI_VERSION
@@ -1 +1 @@
v896
v911
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
14.22.0
14.23.0
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "stripe",
"version": "14.22.0",
"version": "14.23.0",
"description": "Stripe API wrapper",
"keywords": [
"stripe",
Expand Down
8 changes: 8 additions & 0 deletions src/resources.ts
Expand Up @@ -21,6 +21,9 @@ import {FinancialAccounts as TreasuryFinancialAccounts} from './resources/Treasu
import {InboundTransfers as TestHelpersTreasuryInboundTransfers} from './resources/TestHelpers/Treasury/InboundTransfers.js';
import {InboundTransfers as TreasuryInboundTransfers} from './resources/Treasury/InboundTransfers.js';
import {Locations as TerminalLocations} from './resources/Terminal/Locations.js';
import {MeterEventAdjustments as BillingMeterEventAdjustments} from './resources/Billing/MeterEventAdjustments.js';
import {MeterEvents as BillingMeterEvents} from './resources/Billing/MeterEvents.js';
import {Meters as BillingMeters} from './resources/Billing/Meters.js';
import {Orders as ClimateOrders} from './resources/Climate/Orders.js';
import {OutboundPayments as TestHelpersTreasuryOutboundPayments} from './resources/TestHelpers/Treasury/OutboundPayments.js';
import {OutboundPayments as TreasuryOutboundPayments} from './resources/Treasury/OutboundPayments.js';
Expand Down Expand Up @@ -113,6 +116,11 @@ export {Topups} from './resources/Topups.js';
export {Transfers} from './resources/Transfers.js';
export {WebhookEndpoints} from './resources/WebhookEndpoints.js';
export const Apps = resourceNamespace('apps', {Secrets: AppsSecrets});
export const Billing = resourceNamespace('billing', {
MeterEventAdjustments: BillingMeterEventAdjustments,
MeterEvents: BillingMeterEvents,
Meters: BillingMeters,
});
export const BillingPortal = resourceNamespace('billingPortal', {
Configurations: BillingPortalConfigurations,
Sessions: BillingPortalSessions,
Expand Down
10 changes: 10 additions & 0 deletions src/resources/Billing/MeterEventAdjustments.ts
@@ -0,0 +1,10 @@
// File generated from our OpenAPI spec

import {StripeResource} from '../../StripeResource.js';
const stripeMethod = StripeResource.method;
export const MeterEventAdjustments = StripeResource.extend({
create: stripeMethod({
method: 'POST',
fullPath: '/v1/billing/meter_event_adjustments',
}),
});
7 changes: 7 additions & 0 deletions src/resources/Billing/MeterEvents.ts
@@ -0,0 +1,7 @@
// File generated from our OpenAPI spec

import {StripeResource} from '../../StripeResource.js';
const stripeMethod = StripeResource.method;
export const MeterEvents = StripeResource.extend({
create: stripeMethod({method: 'POST', fullPath: '/v1/billing/meter_events'}),
});
27 changes: 27 additions & 0 deletions src/resources/Billing/Meters.ts
@@ -0,0 +1,27 @@
// File generated from our OpenAPI spec

import {StripeResource} from '../../StripeResource.js';
const stripeMethod = StripeResource.method;
export const Meters = StripeResource.extend({
create: stripeMethod({method: 'POST', fullPath: '/v1/billing/meters'}),
retrieve: stripeMethod({method: 'GET', fullPath: '/v1/billing/meters/{id}'}),
update: stripeMethod({method: 'POST', fullPath: '/v1/billing/meters/{id}'}),
list: stripeMethod({
method: 'GET',
fullPath: '/v1/billing/meters',
methodType: 'list',
}),
deactivate: stripeMethod({
method: 'POST',
fullPath: '/v1/billing/meters/{id}/deactivate',
}),
listEventSummaries: stripeMethod({
method: 'GET',
fullPath: '/v1/billing/meters/{id}/event_summaries',
methodType: 'list',
}),
reactivate: stripeMethod({
method: 'POST',
fullPath: '/v1/billing/meters/{id}/reactivate',
}),
});
2 changes: 1 addition & 1 deletion src/stripe.core.ts
Expand Up @@ -49,7 +49,7 @@ export function createStripe(
platformFunctions: PlatformFunctions,
requestSender: RequestSenderFactory = defaultRequestSenderFactory
): typeof Stripe {
Stripe.PACKAGE_VERSION = '14.22.0';
Stripe.PACKAGE_VERSION = '14.23.0';
Stripe.USER_AGENT = {
bindings_version: Stripe.PACKAGE_VERSION,
lang: 'node',
Expand Down
2 changes: 1 addition & 1 deletion test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions types/AccountSessions.d.ts
Expand Up @@ -100,6 +100,11 @@ declare module 'stripe' {
*/
capture_payments: boolean;

/**
* Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
*/
destination_on_behalf_of_charge_management?: boolean;

/**
* Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
*/
Expand Down Expand Up @@ -128,6 +133,11 @@ declare module 'stripe' {
*/
capture_payments: boolean;

/**
* Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
*/
destination_on_behalf_of_charge_management?: boolean;

/**
* Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
*/
Expand Down
10 changes: 10 additions & 0 deletions types/AccountSessionsResource.d.ts
Expand Up @@ -99,6 +99,11 @@ declare module 'stripe' {
*/
capture_payments?: boolean;

/**
* Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
*/
destination_on_behalf_of_charge_management?: boolean;

/**
* Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
*/
Expand Down Expand Up @@ -130,6 +135,11 @@ declare module 'stripe' {
*/
capture_payments?: boolean;

/**
* Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
*/
destination_on_behalf_of_charge_management?: boolean;

/**
* Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
*/
Expand Down
9 changes: 9 additions & 0 deletions types/Accounts.d.ts
Expand Up @@ -223,6 +223,11 @@ declare module 'stripe' {
*/
afterpay_clearpay_payments?: Capabilities.AfterpayClearpayPayments;

/**
* The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments.
*/
amazon_pay_payments?: Capabilities.AmazonPayPayments;

/**
* The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges.
*/
Expand Down Expand Up @@ -411,6 +416,8 @@ declare module 'stripe' {

type AfterpayClearpayPayments = 'active' | 'inactive' | 'pending';

type AmazonPayPayments = 'active' | 'inactive' | 'pending';

type AuBecsDebitPayments = 'active' | 'inactive' | 'pending';

type BacsDebitPayments = 'active' | 'inactive' | 'pending';
Expand Down Expand Up @@ -889,6 +896,7 @@ declare module 'stripe' {
| 'verification_failed_keyed_match'
| 'verification_failed_name_match'
| 'verification_failed_other'
| 'verification_failed_representative_authority'
| 'verification_failed_residential_address'
| 'verification_failed_tax_id_match'
| 'verification_failed_tax_id_not_issued'
Expand Down Expand Up @@ -1053,6 +1061,7 @@ declare module 'stripe' {
| 'verification_failed_keyed_match'
| 'verification_failed_name_match'
| 'verification_failed_other'
| 'verification_failed_representative_authority'
| 'verification_failed_residential_address'
| 'verification_failed_tax_id_match'
| 'verification_failed_tax_id_not_issued'
Expand Down
24 changes: 24 additions & 0 deletions types/AccountsResource.d.ts
Expand Up @@ -197,6 +197,11 @@ declare module 'stripe' {
*/
afterpay_clearpay_payments?: Capabilities.AfterpayClearpayPayments;

/**
* The amazon_pay_payments capability.
*/
amazon_pay_payments?: Capabilities.AmazonPayPayments;

/**
* The au_becs_debit_payments capability.
*/
Expand Down Expand Up @@ -400,6 +405,13 @@ declare module 'stripe' {
requested?: boolean;
}

interface AmazonPayPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}

interface AuBecsDebitPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down Expand Up @@ -1630,6 +1642,11 @@ declare module 'stripe' {
*/
afterpay_clearpay_payments?: Capabilities.AfterpayClearpayPayments;

/**
* The amazon_pay_payments capability.
*/
amazon_pay_payments?: Capabilities.AmazonPayPayments;

/**
* The au_becs_debit_payments capability.
*/
Expand Down Expand Up @@ -1833,6 +1850,13 @@ declare module 'stripe' {
requested?: boolean;
}

interface AmazonPayPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}

interface AuBecsDebitPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down
2 changes: 2 additions & 0 deletions types/BankAccounts.d.ts
Expand Up @@ -242,6 +242,7 @@ declare module 'stripe' {
| 'verification_failed_keyed_match'
| 'verification_failed_name_match'
| 'verification_failed_other'
| 'verification_failed_representative_authority'
| 'verification_failed_residential_address'
| 'verification_failed_tax_id_match'
| 'verification_failed_tax_id_not_issued'
Expand Down Expand Up @@ -374,6 +375,7 @@ declare module 'stripe' {
| 'verification_failed_keyed_match'
| 'verification_failed_name_match'
| 'verification_failed_other'
| 'verification_failed_representative_authority'
| 'verification_failed_residential_address'
| 'verification_failed_tax_id_match'
| 'verification_failed_tax_id_not_issued'
Expand Down
31 changes: 31 additions & 0 deletions types/Billing/MeterEventAdjustments.d.ts
@@ -0,0 +1,31 @@
// File generated from our OpenAPI spec

declare module 'stripe' {
namespace Stripe {
namespace Billing {
/**
* A billing meter event adjustment represents the status of a meter event adjustment.
*/
interface MeterEventAdjustment {
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'billing.meter_event_adjustment';

/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;

/**
* The meter event adjustment's status.
*/
status: MeterEventAdjustment.Status;
}

namespace MeterEventAdjustment {
type Status = 'complete' | 'pending';
}
}
}
}
43 changes: 43 additions & 0 deletions types/Billing/MeterEventAdjustmentsResource.d.ts
@@ -0,0 +1,43 @@
// File generated from our OpenAPI spec

declare module 'stripe' {
namespace Stripe {
namespace Billing {
interface MeterEventAdjustmentCreateParams {
/**
* Specifies which event to cancel.
*/
cancel: MeterEventAdjustmentCreateParams.Cancel;

/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;

/**
* Specifies whether to cancel a single event or a range of events for a time period.
*/
type?: 'cancel';
}

namespace MeterEventAdjustmentCreateParams {
interface Cancel {
/**
* Unique identifier for the event.
*/
identifier: string;
}
}

class MeterEventAdjustmentsResource {
/**
* Creates a billing meter event adjustment
*/
create(
params: MeterEventAdjustmentCreateParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Billing.MeterEventAdjustment>>;
}
}
}
}
48 changes: 48 additions & 0 deletions types/Billing/MeterEventSummaries.d.ts
@@ -0,0 +1,48 @@
// File generated from our OpenAPI spec

declare module 'stripe' {
namespace Stripe {
namespace Billing {
/**
* A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much
* usage was accrued by a customer for that period.
*/
interface MeterEventSummary {
/**
* Unique identifier for the object.
*/
id: string;

/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'billing.meter_event_summary';

/**
* Aggregated value of all the events within start_time (inclusive) and end_time (inclusive). The aggregation strategy is defined on meter via `default_aggregation``.
*/
aggregated_value: number;

/**
* End timestamp for this usage summary (inclusive).
*/
end_time: number;

/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;

/**
* The meter associated with this usage summary.
*/
meter: string;

/**
* Start timestamp for this usage summary (inclusive).
*/
start_time: number;
}
}
}
}

0 comments on commit 042fe38

Please sign in to comment.