Skip to content

Commit

Permalink
Sdk release/next major (#2057)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-stripe authored Apr 10, 2024
1 parent 6adfbb4 commit 5c8bcf4
Show file tree
Hide file tree
Showing 23 changed files with 51 additions and 485 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v938
v940
2 changes: 1 addition & 1 deletion src/apiVersion.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// File generated from our OpenAPI spec

export const ApiVersion = '2023-10-16';
export const ApiVersion = '2024-04-10';
2 changes: 1 addition & 1 deletion test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions testProjects/mjs-ts/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import DefaultStripe, {Stripe} from 'stripe';

const stripe = new Stripe(process.argv[2], {
apiVersion: '2023-10-16',
apiVersion: '2024-04-10',
host: process.env.STRIPE_MOCK_HOST || 'localhost',
port: process.env.STRIPE_MOCK_PORT || 12111,
protocol: 'http',
});
const defaultStripe = new DefaultStripe(process.argv[2], {
apiVersion: '2023-10-16',
apiVersion: '2024-04-10',
host: process.env.STRIPE_MOCK_HOST || 'localhost',
port: process.env.STRIPE_MOCK_PORT || 12111,
protocol: 'http',
Expand Down
6 changes: 1 addition & 5 deletions types/BalanceTransactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,7 @@ declare module 'stripe' {
| 'transfer'
| 'transfer_cancel'
| 'transfer_failure'
| 'transfer_refund'
| 'obligation_inbound'
| 'obligation_payout'
| 'obligation_payout_failure'
| 'obligation_reversal_outbound';
| 'transfer_refund';
}
}
}
9 changes: 0 additions & 9 deletions types/BillingPortal/Configurations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ declare module 'stripe' {
subscription_cancel: Features.SubscriptionCancel;

subscription_update: Features.SubscriptionUpdate;

subscription_pause: Features.SubscriptionPause;
}

namespace Features {
Expand Down Expand Up @@ -189,13 +187,6 @@ declare module 'stripe' {
| 'none';
}

interface SubscriptionPause {
/**
* Whether the feature is enabled.
*/
enabled: boolean;
}

interface SubscriptionUpdate {
/**
* The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable.
Expand Down
24 changes: 0 additions & 24 deletions types/BillingPortal/ConfigurationsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ declare module 'stripe' {
* Information about updating subscriptions in the portal.
*/
subscription_update?: Features.SubscriptionUpdate;

/**
* Information about pausing subscriptions in the portal.
*/
subscription_pause?: Features.SubscriptionPause;
}

namespace Features {
Expand Down Expand Up @@ -179,13 +174,6 @@ declare module 'stripe' {
| 'none';
}

interface SubscriptionPause {
/**
* Whether the feature is enabled.
*/
enabled: boolean;
}

interface SubscriptionUpdate {
/**
* The types of subscription updates that are supported. When empty, subscriptions are not updateable.
Expand Down Expand Up @@ -327,11 +315,6 @@ declare module 'stripe' {
* Information about updating subscriptions in the portal.
*/
subscription_update?: Features.SubscriptionUpdate;

/**
* Information about pausing subscriptions in the portal.
*/
subscription_pause?: Features.SubscriptionPause;
}

namespace Features {
Expand Down Expand Up @@ -428,13 +411,6 @@ declare module 'stripe' {
| 'none';
}

interface SubscriptionPause {
/**
* Whether the feature is enabled.
*/
enabled: boolean;
}

interface SubscriptionUpdate {
/**
* The types of subscription updates that are supported. When empty, subscriptions are not updateable.
Expand Down
3 changes: 1 addition & 2 deletions types/Climate/Suppliers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ declare module 'stripe' {
type RemovalPathway =
| 'biomass_carbon_removal_and_storage'
| 'direct_air_capture'
| 'enhanced_weathering'
| 'various';
| 'enhanced_weathering';
}
}
}
Expand Down
122 changes: 9 additions & 113 deletions types/EventTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ declare module 'stripe' {
| InvoiceUpcomingEvent
| InvoiceUpdatedEvent
| InvoiceVoidedEvent
| InvoiceitemCreatedEvent
| InvoiceitemDeletedEvent
| InvoiceItemCreatedEvent
| InvoiceItemDeletedEvent
| IssuingAuthorizationCreatedEvent
| IssuingAuthorizationRequestEvent
| IssuingAuthorizationUpdatedEvent
Expand Down Expand Up @@ -228,15 +228,7 @@ declare module 'stripe' {
| TreasuryReceivedCreditCreatedEvent
| TreasuryReceivedCreditFailedEvent
| TreasuryReceivedCreditSucceededEvent
| TreasuryReceivedDebitCreatedEvent
| InvoiceitemUpdatedEvent
| OrderCreatedEvent
| RecipientCreatedEvent
| RecipientDeletedEvent
| RecipientUpdatedEvent
| SkuCreatedEvent
| SkuDeletedEvent
| SkuUpdatedEvent;
| TreasuryReceivedDebitCreatedEvent;

/**
* Occurs whenever a user authorizes an application. Sent to the related application only.
Expand Down Expand Up @@ -1748,12 +1740,12 @@ declare module 'stripe' {
/**
* Occurs whenever an invoice item is created.
*/
interface InvoiceitemCreatedEvent extends EventBase {
interface InvoiceItemCreatedEvent extends EventBase {
type: 'invoiceitem.created';
data: InvoiceitemCreatedEvent.Data;
data: InvoiceItemCreatedEvent.Data;
}

namespace InvoiceitemCreatedEvent {
namespace InvoiceItemCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.InvoiceItem;

Expand All @@ -1764,12 +1756,12 @@ declare module 'stripe' {
/**
* Occurs whenever an invoice item is deleted.
*/
interface InvoiceitemDeletedEvent extends EventBase {
interface InvoiceItemDeletedEvent extends EventBase {
type: 'invoiceitem.deleted';
data: InvoiceitemDeletedEvent.Data;
data: InvoiceItemDeletedEvent.Data;
}

namespace InvoiceitemDeletedEvent {
namespace InvoiceItemDeletedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.InvoiceItem;

Expand Down Expand Up @@ -3859,101 +3851,5 @@ declare module 'stripe' {
previous_attributes?: Partial<Stripe.Treasury.ReceivedDebit>;
}
}

/**
* The "invoiceitem.updated" event is deprecated and will be removed in the next major version
*/
interface InvoiceitemUpdatedEvent extends EventBase {
type: 'invoiceitem.updated';
data: InvoiceitemUpdatedEvent.Data;
}

namespace InvoiceitemUpdatedEvent {
interface Data extends Stripe.Event.Data {}
}

/**
* The "order.created" event is deprecated and will be removed in the next major version
*/
interface OrderCreatedEvent extends EventBase {
type: 'order.created';
data: OrderCreatedEvent.Data;
}

namespace OrderCreatedEvent {
interface Data extends Stripe.Event.Data {}
}

/**
* The "recipient.created" event is deprecated and will be removed in the next major version
*/
interface RecipientCreatedEvent extends EventBase {
type: 'recipient.created';
data: RecipientCreatedEvent.Data;
}

namespace RecipientCreatedEvent {
interface Data extends Stripe.Event.Data {}
}

/**
* The "recipient.deleted" event is deprecated and will be removed in the next major version
*/
interface RecipientDeletedEvent extends EventBase {
type: 'recipient.deleted';
data: RecipientDeletedEvent.Data;
}

namespace RecipientDeletedEvent {
interface Data extends Stripe.Event.Data {}
}

/**
* The "recipient.updated" event is deprecated and will be removed in the next major version
*/
interface RecipientUpdatedEvent extends EventBase {
type: 'recipient.updated';
data: RecipientUpdatedEvent.Data;
}

namespace RecipientUpdatedEvent {
interface Data extends Stripe.Event.Data {}
}

/**
* The "sku.created" event is deprecated and will be removed in the next major version
*/
interface SkuCreatedEvent extends EventBase {
type: 'sku.created';
data: SkuCreatedEvent.Data;
}

namespace SkuCreatedEvent {
interface Data extends Stripe.Event.Data {}
}

/**
* The "sku.deleted" event is deprecated and will be removed in the next major version
*/
interface SkuDeletedEvent extends EventBase {
type: 'sku.deleted';
data: SkuDeletedEvent.Data;
}

namespace SkuDeletedEvent {
interface Data extends Stripe.Event.Data {}
}

/**
* The "sku.updated" event is deprecated and will be removed in the next major version
*/
interface SkuUpdatedEvent extends EventBase {
type: 'sku.updated';
data: SkuUpdatedEvent.Data;
}

namespace SkuUpdatedEvent {
interface Data extends Stripe.Event.Data {}
}
}
}
10 changes: 1 addition & 9 deletions types/Events.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,7 @@ declare module 'stripe' {
| 'treasury.received_credit.created'
| 'treasury.received_credit.failed'
| 'treasury.received_credit.succeeded'
| 'treasury.received_debit.created'
| 'invoiceitem.updated'
| 'order.created'
| 'recipient.created'
| 'recipient.deleted'
| 'recipient.updated'
| 'sku.created'
| 'sku.deleted'
| 'sku.updated';
| 'treasury.received_debit.created';
}

/**
Expand Down
12 changes: 0 additions & 12 deletions types/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,6 @@ declare module 'stripe' {
*/
rendering: Invoice.Rendering | null;

/**
* This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
*/
rendering_options: Invoice.RenderingOptions | null;

/**
* The details of the cost of shipping, including the ShippingRate applied on the invoice.
*/
Expand Down Expand Up @@ -1187,13 +1182,6 @@ declare module 'stripe' {
}
}

interface RenderingOptions {
/**
* How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
*/
amount_tax_display: string | null;
}

interface ShippingCost {
/**
* Total shipping cost before any taxes are applied.
Expand Down
Loading

0 comments on commit 5c8bcf4

Please sign in to comment.