stripe 8.183.0 → 8.186.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/VERSION +1 -1
- package/lib/stripe.js +12 -0
- package/package.json +1 -1
- package/types/2020-08-27/Accounts.d.ts +93 -3
- package/types/2020-08-27/Charges.d.ts +7 -2
- package/types/2020-08-27/Checkout/Sessions.d.ts +3 -3
- package/types/2020-08-27/PaymentIntents.d.ts +12 -3
- package/types/2020-08-27/PaymentMethods.d.ts +2 -2
- package/types/2020-08-27/Persons.d.ts +2 -2
- package/types/2020-08-27/Prices.d.ts +3 -3
- package/types/2020-08-27/Terminal/ConnectionTokens.d.ts +2 -2
- package/types/2020-08-27/Tokens.d.ts +29 -2
- package/types/net/net.d.ts +17 -0
- package/types/test/typescriptTest.ts +27 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 8.186.1 - 2021-11-04
|
|
4
|
+
* [#1284](https://github.com/stripe/stripe-node/pull/1284) API Updates
|
|
5
|
+
* Remove support for `ownership_declaration_shown_and_signed` on `TokenCreateParams.account`. This API was unused.
|
|
6
|
+
* Add support for `ownership_declaration_shown_and_signed` on `TokenCreateParams.account.company`
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## 8.186.0 - 2021-11-01
|
|
10
|
+
* [#1283](https://github.com/stripe/stripe-node/pull/1283) API Updates
|
|
11
|
+
* Add support for `ownership_declaration` on `AccountUpdateParams.company`, `AccountCreateParams.company`, `Account.company`, and `TokenCreateParams.account.company`
|
|
12
|
+
* Add support for `proof_of_registration` on `AccountUpdateParams.documents` and `AccountCreateParams.documents`
|
|
13
|
+
* Add support for `ownership_declaration_shown_and_signed` on `TokenCreateParams.account`
|
|
14
|
+
|
|
15
|
+
## 8.185.0 - 2021-11-01
|
|
16
|
+
* [#1282](https://github.com/stripe/stripe-node/pull/1282) API Updates
|
|
17
|
+
* Change type of `AccountUpdateParams.individual.full_name_aliases`, `AccountCreateParams.individual.full_name_aliases`, `PersonCreateParams.full_name_aliases`, `PersonUpdateParams.full_name_aliases`, `TokenCreateParams.account.individual.full_name_aliases`, and `TokenCreateParams.person.full_name_aliases` from `array(string)` to `emptyStringable(array(string))`
|
|
18
|
+
* Add support for new values `en-BE`, `en-ES`, and `en-IT` on enums `PaymentIntentCreateParams.payment_method_options.klarna.preferred_locale`, `PaymentIntentUpdateParams.payment_method_options.klarna.preferred_locale`, and `PaymentIntentConfirmParams.payment_method_options.klarna.preferred_locale`
|
|
19
|
+
|
|
20
|
+
## 8.184.0 - 2021-10-20
|
|
21
|
+
* [#1276](https://github.com/stripe/stripe-node/pull/1276) API Updates
|
|
22
|
+
* Change `Account.controller.type` to be required
|
|
23
|
+
* Add support for `buyer_id` on `Charge.payment_method_details.alipay`
|
|
24
|
+
* [#1273](https://github.com/stripe/stripe-node/pull/1273) Add typed createFetchHttpClient function.
|
|
25
|
+
|
|
3
26
|
## 8.183.0 - 2021-10-15
|
|
4
27
|
* [#1272](https://github.com/stripe/stripe-node/pull/1272) API Updates
|
|
5
28
|
* Change type of `UsageRecordCreateParams.timestamp` from `integer` to `literal('now') | integer`
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
8.
|
|
1
|
+
8.186.1
|
package/lib/stripe.js
CHANGED
|
@@ -142,6 +142,18 @@ Stripe.createNodeHttpClient = (agent) => {
|
|
|
142
142
|
return new NodeHttpClient(agent);
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Creates an HTTP client for issuing Stripe API requests which uses the Web
|
|
147
|
+
* Fetch API.
|
|
148
|
+
*
|
|
149
|
+
* A fetch function can optionally be passed in as a parameter. If none is
|
|
150
|
+
* passed, will default to the default `fetch` function in the global scope.
|
|
151
|
+
*/
|
|
152
|
+
Stripe.createFetchHttpClient = (fetchFn) => {
|
|
153
|
+
const {FetchHttpClient} = require('./net/FetchHttpClient');
|
|
154
|
+
return new FetchHttpClient(fetchFn);
|
|
155
|
+
};
|
|
156
|
+
|
|
145
157
|
Stripe.prototype = {
|
|
146
158
|
/**
|
|
147
159
|
* @deprecated will be removed in a future major version. Use the config object instead:
|
package/package.json
CHANGED
|
@@ -370,6 +370,11 @@ declare module 'stripe' {
|
|
|
370
370
|
*/
|
|
371
371
|
owners_provided?: boolean;
|
|
372
372
|
|
|
373
|
+
/**
|
|
374
|
+
* This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
|
|
375
|
+
*/
|
|
376
|
+
ownership_declaration?: Company.OwnershipDeclaration | null;
|
|
377
|
+
|
|
373
378
|
/**
|
|
374
379
|
* The company's phone number (used for verification).
|
|
375
380
|
*/
|
|
@@ -476,6 +481,23 @@ declare module 'stripe' {
|
|
|
476
481
|
town: string | null;
|
|
477
482
|
}
|
|
478
483
|
|
|
484
|
+
interface OwnershipDeclaration {
|
|
485
|
+
/**
|
|
486
|
+
* The Unix timestamp marking when the beneficial owner attestation was made.
|
|
487
|
+
*/
|
|
488
|
+
date: number | null;
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* The IP address from which the beneficial owner attestation was made.
|
|
492
|
+
*/
|
|
493
|
+
ip: string | null;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* The user-agent string from the browser where the beneficial owner attestation was made.
|
|
497
|
+
*/
|
|
498
|
+
user_agent: string | null;
|
|
499
|
+
}
|
|
500
|
+
|
|
479
501
|
type Structure =
|
|
480
502
|
| 'free_zone_establishment'
|
|
481
503
|
| 'free_zone_llc'
|
|
@@ -536,7 +558,7 @@ declare module 'stripe' {
|
|
|
536
558
|
/**
|
|
537
559
|
* The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself.
|
|
538
560
|
*/
|
|
539
|
-
type
|
|
561
|
+
type: Controller.Type;
|
|
540
562
|
}
|
|
541
563
|
|
|
542
564
|
namespace Controller {
|
|
@@ -1478,6 +1500,11 @@ declare module 'stripe' {
|
|
|
1478
1500
|
*/
|
|
1479
1501
|
owners_provided?: boolean;
|
|
1480
1502
|
|
|
1503
|
+
/**
|
|
1504
|
+
* This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
|
|
1505
|
+
*/
|
|
1506
|
+
ownership_declaration?: Company.OwnershipDeclaration;
|
|
1507
|
+
|
|
1481
1508
|
/**
|
|
1482
1509
|
* The company's phone number (used for verification).
|
|
1483
1510
|
*/
|
|
@@ -1519,6 +1546,23 @@ declare module 'stripe' {
|
|
|
1519
1546
|
line1?: string;
|
|
1520
1547
|
}
|
|
1521
1548
|
|
|
1549
|
+
interface OwnershipDeclaration {
|
|
1550
|
+
/**
|
|
1551
|
+
* The Unix timestamp marking when the beneficial owner attestation was made.
|
|
1552
|
+
*/
|
|
1553
|
+
date?: number;
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* The IP address from which the beneficial owner attestation was made.
|
|
1557
|
+
*/
|
|
1558
|
+
ip?: string;
|
|
1559
|
+
|
|
1560
|
+
/**
|
|
1561
|
+
* The user agent of the browser from which the beneficial owner attestation was made.
|
|
1562
|
+
*/
|
|
1563
|
+
user_agent?: string;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1522
1566
|
type Structure =
|
|
1523
1567
|
| 'free_zone_establishment'
|
|
1524
1568
|
| 'free_zone_llc'
|
|
@@ -1593,6 +1637,11 @@ declare module 'stripe' {
|
|
|
1593
1637
|
* One or more documents that demonstrate proof of a company's tax ID.
|
|
1594
1638
|
*/
|
|
1595
1639
|
company_tax_id_verification?: Documents.CompanyTaxIdVerification;
|
|
1640
|
+
|
|
1641
|
+
/**
|
|
1642
|
+
* One or more documents showing the company's proof of registration with the national business registry.
|
|
1643
|
+
*/
|
|
1644
|
+
proof_of_registration?: Documents.ProofOfRegistration;
|
|
1596
1645
|
}
|
|
1597
1646
|
|
|
1598
1647
|
namespace Documents {
|
|
@@ -1637,6 +1686,13 @@ declare module 'stripe' {
|
|
|
1637
1686
|
*/
|
|
1638
1687
|
files?: Array<string>;
|
|
1639
1688
|
}
|
|
1689
|
+
|
|
1690
|
+
interface ProofOfRegistration {
|
|
1691
|
+
/**
|
|
1692
|
+
* One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
|
|
1693
|
+
*/
|
|
1694
|
+
files?: Array<string>;
|
|
1695
|
+
}
|
|
1640
1696
|
}
|
|
1641
1697
|
|
|
1642
1698
|
interface ExternalAccount {
|
|
@@ -1720,7 +1776,7 @@ declare module 'stripe' {
|
|
|
1720
1776
|
/**
|
|
1721
1777
|
* A list of alternate names or aliases that the individual is known by.
|
|
1722
1778
|
*/
|
|
1723
|
-
full_name_aliases?: Array<string
|
|
1779
|
+
full_name_aliases?: Stripe.Emptyable<Array<string>>;
|
|
1724
1780
|
|
|
1725
1781
|
/**
|
|
1726
1782
|
* The individual's gender (International regulations require either "male" or "female").
|
|
@@ -2514,6 +2570,11 @@ declare module 'stripe' {
|
|
|
2514
2570
|
*/
|
|
2515
2571
|
owners_provided?: boolean;
|
|
2516
2572
|
|
|
2573
|
+
/**
|
|
2574
|
+
* This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
|
|
2575
|
+
*/
|
|
2576
|
+
ownership_declaration?: Company.OwnershipDeclaration;
|
|
2577
|
+
|
|
2517
2578
|
/**
|
|
2518
2579
|
* The company's phone number (used for verification).
|
|
2519
2580
|
*/
|
|
@@ -2555,6 +2616,23 @@ declare module 'stripe' {
|
|
|
2555
2616
|
line1?: string;
|
|
2556
2617
|
}
|
|
2557
2618
|
|
|
2619
|
+
interface OwnershipDeclaration {
|
|
2620
|
+
/**
|
|
2621
|
+
* The Unix timestamp marking when the beneficial owner attestation was made.
|
|
2622
|
+
*/
|
|
2623
|
+
date?: number;
|
|
2624
|
+
|
|
2625
|
+
/**
|
|
2626
|
+
* The IP address from which the beneficial owner attestation was made.
|
|
2627
|
+
*/
|
|
2628
|
+
ip?: string;
|
|
2629
|
+
|
|
2630
|
+
/**
|
|
2631
|
+
* The user agent of the browser from which the beneficial owner attestation was made.
|
|
2632
|
+
*/
|
|
2633
|
+
user_agent?: string;
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2558
2636
|
type Structure =
|
|
2559
2637
|
| 'free_zone_establishment'
|
|
2560
2638
|
| 'free_zone_llc'
|
|
@@ -2629,6 +2707,11 @@ declare module 'stripe' {
|
|
|
2629
2707
|
* One or more documents that demonstrate proof of a company's tax ID.
|
|
2630
2708
|
*/
|
|
2631
2709
|
company_tax_id_verification?: Documents.CompanyTaxIdVerification;
|
|
2710
|
+
|
|
2711
|
+
/**
|
|
2712
|
+
* One or more documents showing the company's proof of registration with the national business registry.
|
|
2713
|
+
*/
|
|
2714
|
+
proof_of_registration?: Documents.ProofOfRegistration;
|
|
2632
2715
|
}
|
|
2633
2716
|
|
|
2634
2717
|
namespace Documents {
|
|
@@ -2673,6 +2756,13 @@ declare module 'stripe' {
|
|
|
2673
2756
|
*/
|
|
2674
2757
|
files?: Array<string>;
|
|
2675
2758
|
}
|
|
2759
|
+
|
|
2760
|
+
interface ProofOfRegistration {
|
|
2761
|
+
/**
|
|
2762
|
+
* One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
|
|
2763
|
+
*/
|
|
2764
|
+
files?: Array<string>;
|
|
2765
|
+
}
|
|
2676
2766
|
}
|
|
2677
2767
|
|
|
2678
2768
|
interface Individual {
|
|
@@ -2719,7 +2809,7 @@ declare module 'stripe' {
|
|
|
2719
2809
|
/**
|
|
2720
2810
|
* A list of alternate names or aliases that the individual is known by.
|
|
2721
2811
|
*/
|
|
2722
|
-
full_name_aliases?: Array<string
|
|
2812
|
+
full_name_aliases?: Stripe.Emptyable<Array<string>>;
|
|
2723
2813
|
|
|
2724
2814
|
/**
|
|
2725
2815
|
* The individual's gender (International regulations require either "male" or "female").
|
|
@@ -543,6 +543,11 @@ declare module 'stripe' {
|
|
|
543
543
|
}
|
|
544
544
|
|
|
545
545
|
interface Alipay {
|
|
546
|
+
/**
|
|
547
|
+
* Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
|
|
548
|
+
*/
|
|
549
|
+
buyer_id?: string;
|
|
550
|
+
|
|
546
551
|
/**
|
|
547
552
|
* Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
|
|
548
553
|
*/
|
|
@@ -648,7 +653,7 @@ declare module 'stripe' {
|
|
|
648
653
|
|
|
649
654
|
interface Boleto {
|
|
650
655
|
/**
|
|
651
|
-
*
|
|
656
|
+
* The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)
|
|
652
657
|
*/
|
|
653
658
|
tax_id: string;
|
|
654
659
|
}
|
|
@@ -1413,7 +1418,7 @@ declare module 'stripe' {
|
|
|
1413
1418
|
|
|
1414
1419
|
/**
|
|
1415
1420
|
* Preferred language of the Klarna authorization page that the customer is redirected to.
|
|
1416
|
-
* Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `it-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `fr-FR`, or `en-FR`
|
|
1421
|
+
* Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `fr-FR`, or `en-FR`
|
|
1417
1422
|
*/
|
|
1418
1423
|
preferred_locale: string | null;
|
|
1419
1424
|
}
|
|
@@ -842,8 +842,8 @@ declare module 'stripe' {
|
|
|
842
842
|
/**
|
|
843
843
|
* The URL to which Stripe should send customers when payment or setup
|
|
844
844
|
* is complete.
|
|
845
|
-
* If you'd like
|
|
846
|
-
*
|
|
845
|
+
* If you'd like to use information from the successful Checkout Session on your page,
|
|
846
|
+
* read the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
|
|
847
847
|
*/
|
|
848
848
|
success_url: string;
|
|
849
849
|
|
|
@@ -1158,7 +1158,7 @@ declare module 'stripe' {
|
|
|
1158
1158
|
enabled: boolean;
|
|
1159
1159
|
|
|
1160
1160
|
/**
|
|
1161
|
-
* The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99.
|
|
1161
|
+
* The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999.
|
|
1162
1162
|
*/
|
|
1163
1163
|
maximum?: number;
|
|
1164
1164
|
|
|
@@ -1193,7 +1193,7 @@ declare module 'stripe' {
|
|
|
1193
1193
|
|
|
1194
1194
|
interface Boleto {
|
|
1195
1195
|
/**
|
|
1196
|
-
*
|
|
1196
|
+
* The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
|
|
1197
1197
|
*/
|
|
1198
1198
|
tax_id: string;
|
|
1199
1199
|
}
|
|
@@ -1657,10 +1657,13 @@ declare module 'stripe' {
|
|
|
1657
1657
|
| 'de-AT'
|
|
1658
1658
|
| 'de-DE'
|
|
1659
1659
|
| 'en-AT'
|
|
1660
|
+
| 'en-BE'
|
|
1660
1661
|
| 'en-DE'
|
|
1661
1662
|
| 'en-DK'
|
|
1663
|
+
| 'en-ES'
|
|
1662
1664
|
| 'en-FI'
|
|
1663
1665
|
| 'en-GB'
|
|
1666
|
+
| 'en-IT'
|
|
1664
1667
|
| 'en-NL'
|
|
1665
1668
|
| 'en-NO'
|
|
1666
1669
|
| 'en-SE'
|
|
@@ -2102,7 +2105,7 @@ declare module 'stripe' {
|
|
|
2102
2105
|
|
|
2103
2106
|
interface Boleto {
|
|
2104
2107
|
/**
|
|
2105
|
-
*
|
|
2108
|
+
* The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
|
|
2106
2109
|
*/
|
|
2107
2110
|
tax_id: string;
|
|
2108
2111
|
}
|
|
@@ -2566,10 +2569,13 @@ declare module 'stripe' {
|
|
|
2566
2569
|
| 'de-AT'
|
|
2567
2570
|
| 'de-DE'
|
|
2568
2571
|
| 'en-AT'
|
|
2572
|
+
| 'en-BE'
|
|
2569
2573
|
| 'en-DE'
|
|
2570
2574
|
| 'en-DK'
|
|
2575
|
+
| 'en-ES'
|
|
2571
2576
|
| 'en-FI'
|
|
2572
2577
|
| 'en-GB'
|
|
2578
|
+
| 'en-IT'
|
|
2573
2579
|
| 'en-NL'
|
|
2574
2580
|
| 'en-NO'
|
|
2575
2581
|
| 'en-SE'
|
|
@@ -3125,7 +3131,7 @@ declare module 'stripe' {
|
|
|
3125
3131
|
|
|
3126
3132
|
interface Boleto {
|
|
3127
3133
|
/**
|
|
3128
|
-
*
|
|
3134
|
+
* The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
|
|
3129
3135
|
*/
|
|
3130
3136
|
tax_id: string;
|
|
3131
3137
|
}
|
|
@@ -3589,10 +3595,13 @@ declare module 'stripe' {
|
|
|
3589
3595
|
| 'de-AT'
|
|
3590
3596
|
| 'de-DE'
|
|
3591
3597
|
| 'en-AT'
|
|
3598
|
+
| 'en-BE'
|
|
3592
3599
|
| 'en-DE'
|
|
3593
3600
|
| 'en-DK'
|
|
3601
|
+
| 'en-ES'
|
|
3594
3602
|
| 'en-FI'
|
|
3595
3603
|
| 'en-GB'
|
|
3604
|
+
| 'en-IT'
|
|
3596
3605
|
| 'en-NL'
|
|
3597
3606
|
| 'en-NO'
|
|
3598
3607
|
| 'en-SE'
|
|
@@ -862,7 +862,7 @@ declare module 'stripe' {
|
|
|
862
862
|
|
|
863
863
|
interface Boleto {
|
|
864
864
|
/**
|
|
865
|
-
*
|
|
865
|
+
* The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
|
|
866
866
|
*/
|
|
867
867
|
tax_id: string;
|
|
868
868
|
}
|
|
@@ -1301,7 +1301,7 @@ declare module 'stripe' {
|
|
|
1301
1301
|
): Promise<Stripe.Response<Stripe.PaymentMethod>>;
|
|
1302
1302
|
|
|
1303
1303
|
/**
|
|
1304
|
-
* Returns a list of PaymentMethods
|
|
1304
|
+
* Returns a list of PaymentMethods. For listing a customer's payment methods, you should use [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list)
|
|
1305
1305
|
*/
|
|
1306
1306
|
list(
|
|
1307
1307
|
params: PaymentMethodListParams,
|
|
@@ -632,7 +632,7 @@ declare module 'stripe' {
|
|
|
632
632
|
/**
|
|
633
633
|
* A list of alternate names or aliases that the person is known by.
|
|
634
634
|
*/
|
|
635
|
-
full_name_aliases?: Array<string
|
|
635
|
+
full_name_aliases?: Stripe.Emptyable<Array<string>>;
|
|
636
636
|
|
|
637
637
|
/**
|
|
638
638
|
* The person's gender (International regulations require either "male" or "female").
|
|
@@ -899,7 +899,7 @@ declare module 'stripe' {
|
|
|
899
899
|
/**
|
|
900
900
|
* A list of alternate names or aliases that the person is known by.
|
|
901
901
|
*/
|
|
902
|
-
full_name_aliases?: Array<string
|
|
902
|
+
full_name_aliases?: Stripe.Emptyable<Array<string>>;
|
|
903
903
|
|
|
904
904
|
/**
|
|
905
905
|
* The person's gender (International regulations require either "male" or "female").
|
|
@@ -44,7 +44,7 @@ declare module 'stripe' {
|
|
|
44
44
|
livemode: boolean;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* A lookup key used to retrieve prices dynamically from a static string.
|
|
47
|
+
* A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
|
|
48
48
|
*/
|
|
49
49
|
lookup_key: string | null;
|
|
50
50
|
|
|
@@ -238,7 +238,7 @@ declare module 'stripe' {
|
|
|
238
238
|
expand?: Array<string>;
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
|
-
* A lookup key used to retrieve prices dynamically from a static string.
|
|
241
|
+
* A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
|
|
242
242
|
*/
|
|
243
243
|
lookup_key?: string;
|
|
244
244
|
|
|
@@ -451,7 +451,7 @@ declare module 'stripe' {
|
|
|
451
451
|
expand?: Array<string>;
|
|
452
452
|
|
|
453
453
|
/**
|
|
454
|
-
* A lookup key used to retrieve prices dynamically from a static string.
|
|
454
|
+
* A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
|
|
455
455
|
*/
|
|
456
456
|
lookup_key?: string;
|
|
457
457
|
|
|
@@ -13,7 +13,7 @@ declare module 'stripe' {
|
|
|
13
13
|
object: 'terminal.connection_token';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/
|
|
16
|
+
* The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens).
|
|
17
17
|
*/
|
|
18
18
|
location?: string;
|
|
19
19
|
|
|
@@ -30,7 +30,7 @@ declare module 'stripe' {
|
|
|
30
30
|
expand?: Array<string>;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/
|
|
33
|
+
* The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens).
|
|
34
34
|
*/
|
|
35
35
|
location?: string;
|
|
36
36
|
}
|
|
@@ -177,6 +177,16 @@ declare module 'stripe' {
|
|
|
177
177
|
*/
|
|
178
178
|
owners_provided?: boolean;
|
|
179
179
|
|
|
180
|
+
/**
|
|
181
|
+
* This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
|
|
182
|
+
*/
|
|
183
|
+
ownership_declaration?: Company.OwnershipDeclaration;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct.
|
|
187
|
+
*/
|
|
188
|
+
ownership_declaration_shown_and_signed?: boolean;
|
|
189
|
+
|
|
180
190
|
/**
|
|
181
191
|
* The company's phone number (used for verification).
|
|
182
192
|
*/
|
|
@@ -218,6 +228,23 @@ declare module 'stripe' {
|
|
|
218
228
|
line1?: string;
|
|
219
229
|
}
|
|
220
230
|
|
|
231
|
+
interface OwnershipDeclaration {
|
|
232
|
+
/**
|
|
233
|
+
* The Unix timestamp marking when the beneficial owner attestation was made.
|
|
234
|
+
*/
|
|
235
|
+
date?: number;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* The IP address from which the beneficial owner attestation was made.
|
|
239
|
+
*/
|
|
240
|
+
ip?: string;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* The user agent of the browser from which the beneficial owner attestation was made.
|
|
244
|
+
*/
|
|
245
|
+
user_agent?: string;
|
|
246
|
+
}
|
|
247
|
+
|
|
221
248
|
type Structure =
|
|
222
249
|
| 'free_zone_establishment'
|
|
223
250
|
| 'free_zone_llc'
|
|
@@ -306,7 +333,7 @@ declare module 'stripe' {
|
|
|
306
333
|
/**
|
|
307
334
|
* A list of alternate names or aliases that the individual is known by.
|
|
308
335
|
*/
|
|
309
|
-
full_name_aliases?: Array<string
|
|
336
|
+
full_name_aliases?: Stripe.Emptyable<Array<string>>;
|
|
310
337
|
|
|
311
338
|
/**
|
|
312
339
|
* The individual's gender (International regulations require either "male" or "female").
|
|
@@ -553,7 +580,7 @@ declare module 'stripe' {
|
|
|
553
580
|
/**
|
|
554
581
|
* A list of alternate names or aliases that the person is known by.
|
|
555
582
|
*/
|
|
556
|
-
full_name_aliases?: Array<string
|
|
583
|
+
full_name_aliases?: Stripe.Emptyable<Array<string>>;
|
|
557
584
|
|
|
558
585
|
/**
|
|
559
586
|
* The person's gender (International regulations require either "male" or "female").
|
package/types/net/net.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
/// <reference lib="dom" />
|
|
2
3
|
|
|
3
4
|
import {IncomingMessage} from 'http';
|
|
4
5
|
declare module 'stripe' {
|
|
@@ -61,5 +62,21 @@ declare module 'stripe' {
|
|
|
61
62
|
) => HttpClient<
|
|
62
63
|
HttpClientResponse<IncomingMessage, Stripe.StripeStreamResponse>
|
|
63
64
|
>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Creates an HTTP client for issuing Stripe API requests which uses the Web
|
|
68
|
+
* Fetch API.
|
|
69
|
+
*
|
|
70
|
+
* A fetch function can optionally be passed in as a parameter. If none is
|
|
71
|
+
* passed, will default to the default `fetch` function in the global scope.
|
|
72
|
+
*/
|
|
73
|
+
export const createFetchHttpClient: (
|
|
74
|
+
fetchFn?: WindowOrWorkerGlobalScope['fetch']
|
|
75
|
+
) => HttpClient<
|
|
76
|
+
HttpClientResponse<
|
|
77
|
+
ReturnType<WindowOrWorkerGlobalScope['fetch']>,
|
|
78
|
+
ReadableStream<Uint8Array>
|
|
79
|
+
>
|
|
80
|
+
>;
|
|
64
81
|
}
|
|
65
82
|
}
|
|
@@ -222,3 +222,30 @@ async (): Promise<void> => {
|
|
|
222
222
|
|
|
223
223
|
const jsonResponse: object = await response.toJSON();
|
|
224
224
|
};
|
|
225
|
+
|
|
226
|
+
// Test FetchHttpClient request processing.
|
|
227
|
+
async (): Promise<void> => {
|
|
228
|
+
const client = Stripe.createFetchHttpClient(window.fetch);
|
|
229
|
+
|
|
230
|
+
const response = await client.makeRequest(
|
|
231
|
+
'api.stripe.com',
|
|
232
|
+
'443',
|
|
233
|
+
'/test',
|
|
234
|
+
'POST',
|
|
235
|
+
{
|
|
236
|
+
'Stripe-Account': 'account',
|
|
237
|
+
'Content-Length': 123,
|
|
238
|
+
},
|
|
239
|
+
'requestdata',
|
|
240
|
+
'https',
|
|
241
|
+
80000
|
|
242
|
+
);
|
|
243
|
+
|
|
244
|
+
const stream: ReadableStream = response.toStream(() => {
|
|
245
|
+
return;
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
const results = await stream.getReader().read();
|
|
249
|
+
|
|
250
|
+
const jsonResponse: object = await response.toJSON();
|
|
251
|
+
};
|