Skip to content

Commit

Permalink
Merge pull request #993 from stripe/remi/codegen-4c67ab9
Browse files Browse the repository at this point in the history
Multiple API changes
  • Loading branch information
remi-stripe authored Sep 2, 2020
2 parents 128a020 + 626ceba commit b661208
Show file tree
Hide file tree
Showing 8 changed files with 955 additions and 7 deletions.
6 changes: 6 additions & 0 deletions lib/resources/Issuing/Disputes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
'use strict';

const StripeResource = require('../../StripeResource');
const stripeMethod = StripeResource.method;

module.exports = StripeResource.extend({
path: 'issuing/disputes',

includeBasic: ['create', 'list', 'retrieve', 'update'],

submit: stripeMethod({
method: 'POST',
path: '/{dispute}/submit',
}),
});
23 changes: 23 additions & 0 deletions test/resources/Issuing/Disputes.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,28 @@ describe('Issuing', () => {
});
});
});

describe('submit', () => {
it('Sends the correct request', () => {
stripe.issuing.disputes.submit('idp_123', {
metadata: {
thing1: true,
thing2: 'yes',
},
});
expect(stripe.LAST_REQUEST).to.deep.equal({
method: 'POST',
url: '/v1/issuing/disputes/idp_123/submit',
headers: {},
data: {
metadata: {
thing1: true,
thing2: 'yes',
},
},
settings: {},
});
});
});
});
});
11 changes: 11 additions & 0 deletions types/2020-08-27/BankAccounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ declare module 'stripe' {
*/
account_holder_type: string | null;

/**
* A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout.
*/
available_payout_methods?: Array<
BankAccount.AvailablePayoutMethod
> | null;

/**
* Name of the bank associated with the routing number (e.g., `WELLS FARGO`).
*/
Expand Down Expand Up @@ -85,6 +92,10 @@ declare module 'stripe' {
status: string;
}

namespace BankAccount {
type AvailablePayoutMethod = 'instant' | 'standard';
}

/**
* The DeletedBankAccount object.
*/
Expand Down
2 changes: 1 addition & 1 deletion types/2020-08-27/Cards.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ declare module 'stripe' {
address_zip_check: string | null;

/**
* A set of available payout methods for this card. Will be either `["standard"]` or `["standard", "instant"]`. Only values from this set should be passed as the `method` when creating a transfer.
* A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout.
*/
available_payout_methods?: Array<Card.AvailablePayoutMethod> | null;

Expand Down
8 changes: 8 additions & 0 deletions types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ declare module 'stripe' {
*/
payment_method_types: Array<string>;

/**
* The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.
* You can use this value to decide when to fulfill your customer's order.
*/
payment_status: Session.PaymentStatus;

/**
* The ID of the SetupIntent for Checkout Sessions in `setup` mode.
*/
Expand Down Expand Up @@ -191,6 +197,8 @@ declare module 'stripe' {

type Mode = 'payment' | 'setup' | 'subscription';

type PaymentStatus = 'no_payment_required' | 'paid' | 'unpaid';

interface Shipping {
address?: Address;

Expand Down
Loading

0 comments on commit b661208

Please sign in to comment.