Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple API changes #993

Merged
merged 3 commits into from
Sep 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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