Skip to content

Commit

Permalink
Merge pull request #2036 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] committed Mar 14, 2024
2 parents bffc1f1 + 9dfa0b3 commit 93a3d43
Show file tree
Hide file tree
Showing 37 changed files with 2,357 additions and 5 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Changelog

## 14.21.0 - 2024-03-14
* [#2035](https://github.com/stripe/stripe-node/pull/2035) Update generated code
* Add support for new resources `Issuing.PersonalizationDesign` and `Issuing.PhysicalBundle`
* Add support for `create`, `list`, `retrieve`, and `update` methods on resource `PersonalizationDesign`
* Add support for `list` and `retrieve` methods on resource `PhysicalBundle`
* Add support for `personalization_design` on `Issuing.CardCreateParams`, `Issuing.CardListParams`, `Issuing.CardUpdateParams`, and `Issuing.Card`
* Change type of `SubscriptionCreateParams.application_fee_percent` and `SubscriptionUpdateParams.application_fee_percent` from `number` to `emptyStringable(number)`
* Add support for `sepa_debit` on `Subscription.payment_settings.payment_method_options`, `SubscriptionCreateParams.payment_settings.payment_method_options`, and `SubscriptionUpdateParams.payment_settings.payment_method_options`

## 14.21.0-beta.1 - 2024-03-07
* [#2032](https://github.com/stripe/stripe-node/pull/2032) Update generated code for beta
* Add support for new value `billing_period_end` on enums `QuoteCreateParams.lines[].ends_at.type`, `QuoteLine.ends_at.type`, and `QuoteUpdateParams.lines[].ends_at.type`

## 14.20.0 - 2024-03-07
* [#2033](https://github.com/stripe/stripe-node/pull/2033) Update generated code
* Add support for `documents` on `AccountSession.components` and `AccountSessionCreateParams.components`
* Add support for `request_three_d_secure` on `Checkout.Session.payment_method_options.card` and `Checkout.SessionCreateParams.payment_method_options.card`
* Add support for `created` on `CreditNoteListParams`
* Add support for `sepa_debit` on `Invoice.payment_settings.payment_method_options`, `InvoiceCreateParams.payment_settings.payment_method_options`, and `InvoiceUpdateParams.payment_settings.payment_method_options`

## 14.20.0-beta.1 - 2024-02-29
* [#2026](https://github.com/stripe/stripe-node/pull/2026) Update generated code for beta
* Remove support for resource `Entitlements.Event`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v869
v879
10 changes: 10 additions & 0 deletions src/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {Cards as GiftCardsCards} from './resources/GiftCards/Cards.js';
import {Cards as IssuingCards} from './resources/Issuing/Cards.js';
import {Configurations as BillingPortalConfigurations} from './resources/BillingPortal/Configurations.js';
import {Configurations as TerminalConfigurations} from './resources/Terminal/Configurations.js';
import {ConfirmationTokens as TestHelpersConfirmationTokens} from './resources/TestHelpers/ConfirmationTokens.js';
import {ConnectionTokens as TerminalConnectionTokens} from './resources/Terminal/ConnectionTokens.js';
import {CreditReversals as TreasuryCreditReversals} from './resources/Treasury/CreditReversals.js';
import {CreditUnderwritingRecords as IssuingCreditUnderwritingRecords} from './resources/Issuing/CreditUnderwritingRecords.js';
Expand All @@ -27,6 +28,9 @@ import {Forms as TaxForms} from './resources/Tax/Forms.js';
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 @@ -123,6 +127,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 Expand Up @@ -193,6 +202,7 @@ export const Terminal = resourceNamespace('terminal', {
Readers: TerminalReaders,
});
export const TestHelpers = resourceNamespace('testHelpers', {
ConfirmationTokens: TestHelpersConfirmationTokens,
Customers: TestHelpersCustomers,
Refunds: TestHelpersRefunds,
TestClocks: TestHelpersTestClocks,
Expand Down
10 changes: 10 additions & 0 deletions src/resources/Billing/MeterEventAdjustments.ts
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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',
}),
});
12 changes: 12 additions & 0 deletions src/resources/Invoices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export const Invoices = StripeResource.extend({
methodType: 'list',
}),
del: stripeMethod({method: 'DELETE', fullPath: '/v1/invoices/{invoice}'}),
addLines: stripeMethod({
method: 'POST',
fullPath: '/v1/invoices/{invoice}/add_lines',
}),
attachPaymentIntent: stripeMethod({
method: 'POST',
fullPath: '/v1/invoices/{invoice}/attach_payment_intent',
Expand Down Expand Up @@ -44,6 +48,10 @@ export const Invoices = StripeResource.extend({
fullPath: '/v1/invoices/{invoice}/mark_uncollectible',
}),
pay: stripeMethod({method: 'POST', fullPath: '/v1/invoices/{invoice}/pay'}),
removeLines: stripeMethod({
method: 'POST',
fullPath: '/v1/invoices/{invoice}/remove_lines',
}),
retrievePayment: stripeMethod({
method: 'GET',
fullPath: '/v1/invoices/{invoice}/payments/{invoice_payment}',
Expand All @@ -61,6 +69,10 @@ export const Invoices = StripeResource.extend({
method: 'POST',
fullPath: '/v1/invoices/{invoice}/send',
}),
updateLines: stripeMethod({
method: 'POST',
fullPath: '/v1/invoices/{invoice}/update_lines',
}),
updateLineItem: stripeMethod({
method: 'POST',
fullPath: '/v1/invoices/{invoice}/lines/{line_item_id}',
Expand Down
10 changes: 10 additions & 0 deletions src/resources/TestHelpers/ConfirmationTokens.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// File generated from our OpenAPI spec

import {StripeResource} from '../../StripeResource.js';
const stripeMethod = StripeResource.method;
export const ConfirmationTokens = StripeResource.extend({
create: stripeMethod({
method: 'POST',
fullPath: '/v1/test_helpers/confirmation_tokens',
}),
});
78 changes: 77 additions & 1 deletion test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions types/AccountSessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ declare module 'stripe' {

capital_financing_promotion?: Components.CapitalFinancingPromotion;

/**
* Configuration for the documents embedded component.
*/
documents?: Components.Documents;

/**
Expand Down
2 changes: 1 addition & 1 deletion types/AccountsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ declare module 'stripe' {

interface Dashboard {
/**
* Whether this account should have access to the full Stripe dashboard (`full`) or no dashboard (`none`).
* Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no dashboard (`none`). Defaults to `full`.
*/
type?: Dashboard.Type;
}
Expand Down
31 changes: 31 additions & 0 deletions types/Billing/MeterEventAdjustments.d.ts
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
}
50 changes: 50 additions & 0 deletions types/Billing/MeterEvents.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// File generated from our OpenAPI spec

declare module 'stripe' {
namespace Stripe {
namespace Billing {
/**
* A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage.
* Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing.
*/
interface MeterEvent {
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'billing.meter_event';

/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;

/**
* The name of the meter event. Corresponds with the `event_name` field on a meter.
*/
event_name: string;

/**
* A unique identifier for the event.
*/
identifier: string;

/**
* 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 payload of the event.
*/
payload: {
[key: string]: string;
};

/**
* The timestamp passed in when creating the event. Measured in seconds since the Unix epoch.
*/
timestamp: number;
}
}
}
}
Loading

0 comments on commit 93a3d43

Please sign in to comment.