Skip to content

Commit

Permalink
Update generated code (#2035)
Browse files Browse the repository at this point in the history
* Update generated code for v870

* Update generated code for v871

* Update generated code for v872

* Update generated code for v874

* Update generated code for v876

* Update generated code for v877

* Update generated code for v878

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Mar 14, 2024
1 parent 097bc22 commit 16310e1
Show file tree
Hide file tree
Showing 17 changed files with 839 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v869
v878
6 changes: 6 additions & 0 deletions src/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ import {OutboundPayments as TestHelpersTreasuryOutboundPayments} from './resourc
import {OutboundPayments as TreasuryOutboundPayments} from './resources/Treasury/OutboundPayments.js';
import {OutboundTransfers as TestHelpersTreasuryOutboundTransfers} from './resources/TestHelpers/Treasury/OutboundTransfers.js';
import {OutboundTransfers as TreasuryOutboundTransfers} from './resources/Treasury/OutboundTransfers.js';
import {PersonalizationDesigns as TestHelpersIssuingPersonalizationDesigns} from './resources/TestHelpers/Issuing/PersonalizationDesigns.js';
import {PersonalizationDesigns as IssuingPersonalizationDesigns} from './resources/Issuing/PersonalizationDesigns.js';
import {PhysicalBundles as IssuingPhysicalBundles} from './resources/Issuing/PhysicalBundles.js';
import {Products as ClimateProducts} from './resources/Climate/Products.js';
import {Readers as TestHelpersTerminalReaders} from './resources/TestHelpers/Terminal/Readers.js';
import {Readers as TerminalReaders} from './resources/Terminal/Readers.js';
Expand Down Expand Up @@ -133,6 +136,8 @@ export const Issuing = resourceNamespace('issuing', {
Cardholders: IssuingCardholders,
Cards: IssuingCards,
Disputes: IssuingDisputes,
PersonalizationDesigns: IssuingPersonalizationDesigns,
PhysicalBundles: IssuingPhysicalBundles,
Tokens: IssuingTokens,
Transactions: IssuingTransactions,
});
Expand Down Expand Up @@ -167,6 +172,7 @@ export const TestHelpers = resourceNamespace('testHelpers', {
Issuing: resourceNamespace('issuing', {
Authorizations: TestHelpersIssuingAuthorizations,
Cards: TestHelpersIssuingCards,
PersonalizationDesigns: TestHelpersIssuingPersonalizationDesigns,
Transactions: TestHelpersIssuingTransactions,
}),
Terminal: resourceNamespace('terminal', {
Expand Down
23 changes: 23 additions & 0 deletions src/resources/Issuing/PersonalizationDesigns.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// File generated from our OpenAPI spec

import {StripeResource} from '../../StripeResource.js';
const stripeMethod = StripeResource.method;
export const PersonalizationDesigns = StripeResource.extend({
create: stripeMethod({
method: 'POST',
fullPath: '/v1/issuing/personalization_designs',
}),
retrieve: stripeMethod({
method: 'GET',
fullPath: '/v1/issuing/personalization_designs/{personalization_design}',
}),
update: stripeMethod({
method: 'POST',
fullPath: '/v1/issuing/personalization_designs/{personalization_design}',
}),
list: stripeMethod({
method: 'GET',
fullPath: '/v1/issuing/personalization_designs',
methodType: 'list',
}),
});
15 changes: 15 additions & 0 deletions src/resources/Issuing/PhysicalBundles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// File generated from our OpenAPI spec

import {StripeResource} from '../../StripeResource.js';
const stripeMethod = StripeResource.method;
export const PhysicalBundles = StripeResource.extend({
retrieve: stripeMethod({
method: 'GET',
fullPath: '/v1/issuing/physical_bundles/{physical_bundle}',
}),
list: stripeMethod({
method: 'GET',
fullPath: '/v1/issuing/physical_bundles',
methodType: 'list',
}),
});
21 changes: 21 additions & 0 deletions src/resources/TestHelpers/Issuing/PersonalizationDesigns.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// File generated from our OpenAPI spec

import {StripeResource} from '../../../StripeResource.js';
const stripeMethod = StripeResource.method;
export const PersonalizationDesigns = StripeResource.extend({
activate: stripeMethod({
method: 'POST',
fullPath:
'/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate',
}),
deactivate: stripeMethod({
method: 'POST',
fullPath:
'/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate',
}),
reject: stripeMethod({
method: 'POST',
fullPath:
'/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject',
}),
});
76 changes: 76 additions & 0 deletions test/resources/generated_examples_test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,16 @@ describe('Generated tests', function() {
expect(cashBalance).not.to.be.null;
});

it('test_customers_cash_balance_transactions_get', async function() {
const customerCashBalanceTransactions = await stripe.customers.listCashBalanceTransactions(
'cus_123',
{
limit: 3,
}
);
expect(customerCashBalanceTransactions).not.to.be.null;
});

it('test_customers_delete', async function() {
const deleted = await stripe.customers.del('cus_xxxxxxxxxxxxx');
expect(deleted).not.to.be.null;
Expand Down Expand Up @@ -1516,6 +1526,46 @@ describe('Generated tests', function() {
expect(dispute).not.to.be.null;
});

it('test_issuing_personalization_designs_get', async function() {
const personalizationDesigns = await stripe.issuing.personalizationDesigns.list();
expect(personalizationDesigns).not.to.be.null;
});

it('test_issuing_personalization_designs_get_2', async function() {
const personalizationDesign = await stripe.issuing.personalizationDesigns.retrieve(
'pd_xyz'
);
expect(personalizationDesign).not.to.be.null;
});

it('test_issuing_personalization_designs_post', async function() {
const personalizationDesign = await stripe.issuing.personalizationDesigns.create(
{
physical_bundle: 'pb_xyz',
}
);
expect(personalizationDesign).not.to.be.null;
});

it('test_issuing_personalization_designs_post_2', async function() {
const personalizationDesign = await stripe.issuing.personalizationDesigns.update(
'pd_xyz'
);
expect(personalizationDesign).not.to.be.null;
});

it('test_issuing_physical_bundles_get', async function() {
const physicalBundles = await stripe.issuing.physicalBundles.list();
expect(physicalBundles).not.to.be.null;
});

it('test_issuing_physical_bundles_get_2', async function() {
const physicalBundle = await stripe.issuing.physicalBundles.retrieve(
'pb_xyz'
);
expect(physicalBundle).not.to.be.null;
});

it('test_issuing_transactions_get', async function() {
const transactions = await stripe.issuing.transactions.list({
limit: 3,
Expand Down Expand Up @@ -3093,6 +3143,32 @@ describe('Generated tests', function() {
expect(card).not.to.be.null;
});

it('test_test_helpers_issuing_personalization_designs_activate_post', async function() {
const personalizationDesign = await stripe.testHelpers.issuing.personalizationDesigns.activate(
'pd_xyz'
);
expect(personalizationDesign).not.to.be.null;
});

it('test_test_helpers_issuing_personalization_designs_deactivate_post', async function() {
const personalizationDesign = await stripe.testHelpers.issuing.personalizationDesigns.deactivate(
'pd_xyz'
);
expect(personalizationDesign).not.to.be.null;
});

it('test_test_helpers_issuing_personalization_designs_reject_post', async function() {
const personalizationDesign = await stripe.testHelpers.issuing.personalizationDesigns.reject(
'pd_xyz',
{
rejection_reasons: {
card_logo: ['geographic_location'],
},
}
);
expect(personalizationDesign).not.to.be.null;
});

it('test_test_helpers_issuing_transactions_create_force_capture_post', async function() {
const transaction = await stripe.testHelpers.issuing.transactions.createForceCapture(
{
Expand Down
3 changes: 3 additions & 0 deletions types/AccountSessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ declare module 'stripe' {
*/
account_onboarding?: Components.AccountOnboarding;

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

/**
Expand Down
8 changes: 8 additions & 0 deletions types/Issuing/Cards.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ declare module 'stripe' {
*/
number?: string;

/**
* The personalization design object belonging to this card.
*/
personalization_design?:
| string
| Stripe.Issuing.PersonalizationDesign
| null;

/**
* The latest card that replaces this card, if any.
*/
Expand Down
9 changes: 9 additions & 0 deletions types/Issuing/CardsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ declare module 'stripe' {
*/
metadata?: Stripe.MetadataParam;

/**
* The personalization design object belonging to this card.
*/
personalization_design?: string;

/**
* The desired PIN for this card.
*/
Expand Down Expand Up @@ -1119,6 +1124,8 @@ declare module 'stripe' {
*/
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;

personalization_design?: string;

/**
* The desired new PIN for this card.
*/
Expand Down Expand Up @@ -2116,6 +2123,8 @@ declare module 'stripe' {
*/
last4?: string;

personalization_design?: string;

/**
* Only return cards that have the given status. One of `active`, `inactive`, or `canceled`.
*/
Expand Down
142 changes: 142 additions & 0 deletions types/Issuing/PersonalizationDesigns.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
// File generated from our OpenAPI spec

declare module 'stripe' {
namespace Stripe {
namespace Issuing {
/**
* A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line.
*/
interface PersonalizationDesign {
/**
* Unique identifier for the object.
*/
id: string;

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

/**
* The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
*/
card_logo: string | Stripe.File | null;

/**
* Hash containing carrier text, for use with physical bundles that support carrier text.
*/
carrier_text: PersonalizationDesign.CarrierText | null;

/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: 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;

/**
* A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
*/
lookup_key: string | null;

/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata: Stripe.Metadata;

/**
* Friendly display name.
*/
name: string | null;

/**
* The physical bundle object belonging to this personalization design.
*/
physical_bundle: string | Stripe.Issuing.PhysicalBundle;

preferences: PersonalizationDesign.Preferences;

rejection_reasons: PersonalizationDesign.RejectionReasons;

/**
* Whether this personalization design can be used to create cards.
*/
status: PersonalizationDesign.Status;
}

namespace PersonalizationDesign {
interface CarrierText {
/**
* The footer body text of the carrier letter.
*/
footer_body: string | null;

/**
* The footer title text of the carrier letter.
*/
footer_title: string | null;

/**
* The header body text of the carrier letter.
*/
header_body: string | null;

/**
* The header title text of the carrier letter.
*/
header_title: string | null;
}

interface Preferences {
/**
* Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
*/
is_default: boolean;

/**
* Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist.
*/
is_platform_default: boolean | null;
}

interface RejectionReasons {
/**
* The reason(s) the card logo was rejected.
*/
card_logo: Array<RejectionReasons.CardLogo> | null;

/**
* The reason(s) the carrier text was rejected.
*/
carrier_text: Array<RejectionReasons.CarrierText> | null;
}

namespace RejectionReasons {
type CardLogo =
| 'geographic_location'
| 'inappropriate'
| 'network_name'
| 'non_binary_image'
| 'non_fiat_currency'
| 'other'
| 'other_entity'
| 'promotional_material';

type CarrierText =
| 'geographic_location'
| 'inappropriate'
| 'network_name'
| 'non_fiat_currency'
| 'other'
| 'other_entity'
| 'promotional_material';
}

type Status = 'active' | 'inactive' | 'rejected' | 'review';
}
}
}
}
Loading

0 comments on commit 16310e1

Please sign in to comment.