Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging from origin/master to sdk-release/next-major (#2049)
- Loading branch information
1 parent
800e45e
commit d89054f
Showing
42 changed files
with
2,647 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v878 | ||
v896 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
14.21.0 | ||
14.22.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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({ | ||
retrieve: stripeMethod({ | ||
method: 'GET', | ||
fullPath: '/v1/confirmation_tokens/{confirmation_token}', | ||
}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// File generated from our OpenAPI spec | ||
|
||
import {StripeResource} from '../../StripeResource.js'; | ||
const stripeMethod = StripeResource.method; | ||
export const Requests = StripeResource.extend({ | ||
create: stripeMethod({method: 'POST', fullPath: '/v1/forwarding/requests'}), | ||
retrieve: stripeMethod({ | ||
method: 'GET', | ||
fullPath: '/v1/forwarding/requests/{id}', | ||
}), | ||
list: stripeMethod({ | ||
method: 'GET', | ||
fullPath: '/v1/forwarding/requests', | ||
methodType: 'list', | ||
}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import {Stripe} from 'stripe'; | ||
import assert from 'assert'; | ||
|
||
// API key is null to trigger an authentication error | ||
const stripe = new Stripe("i'm not a real key", { | ||
host: process.env.STRIPE_MOCK_HOST || 'localhost', | ||
port: process.env.STRIPE_MOCK_PORT || 12111, | ||
protocol: 'http', | ||
}); | ||
|
||
try { | ||
throw new stripe.errors.StripeUnknownError({ | ||
charge: 'foo', | ||
unknown_prop: 'bar', | ||
}); | ||
} catch (e) { | ||
assert (e instanceof stripe.errors.StripeUnknownError); | ||
assert (e.type === 'StripeUnknownError'); | ||
} | ||
|
||
async function exampleFunction(args) { | ||
try { | ||
await stripe.paymentIntents.create(args); | ||
throw new Error('Expected an error'); | ||
} catch (e) { | ||
assert (e instanceof stripe.errors.StripeAuthenticationError); | ||
assert (e.type === 'StripeAuthenticationError'); | ||
} | ||
} | ||
|
||
exampleFunction({ | ||
// The required parameter currency is missing | ||
amount: 2000, | ||
confirm: true, | ||
payment_method: 'pm_card_visa', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "mjs", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"dependencies": { | ||
"stripe": "file:../../" | ||
}, | ||
"scripts": { | ||
"clean": "rm -rf node_modules && rm -rf dist", | ||
"build": "esbuild index.js --bundle --platform=node --minify --target=es2020 --outdir=dist", | ||
"start": "node dist/index.js" | ||
}, | ||
"devDependencies": { | ||
"esbuild": "^0.20.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.