stripe 9.0.0 → 9.3.0
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 +35 -0
- package/VERSION +1 -1
- package/lib/resources/Apps/Secrets.js +31 -0
- package/lib/resources/Customers.js +5 -0
- package/lib/resources/FinancialConnections/Accounts.js +12 -0
- package/lib/resources/TestHelpers/Treasury/InboundTransfers.js +25 -0
- package/lib/resources/TestHelpers/Treasury/OutboundPayments.js +25 -0
- package/lib/resources/TestHelpers/Treasury/OutboundTransfers.js +25 -0
- package/lib/resources/TestHelpers/Treasury/ReceivedCredits.js +15 -0
- package/lib/resources/TestHelpers/Treasury/ReceivedDebits.js +15 -0
- package/lib/resources/Treasury/CreditReversals.js +26 -0
- package/lib/resources/Treasury/DebitReversals.js +26 -0
- package/lib/resources/Treasury/FinancialAccounts.js +41 -0
- package/lib/resources/Treasury/InboundTransfers.js +31 -0
- package/lib/resources/Treasury/OutboundPayments.js +31 -0
- package/lib/resources/Treasury/OutboundTransfers.js +31 -0
- package/lib/resources/Treasury/ReceivedCredits.js +21 -0
- package/lib/resources/Treasury/ReceivedDebits.js +21 -0
- package/lib/resources/Treasury/TransactionEntries.js +21 -0
- package/lib/resources/Treasury/Transactions.js +21 -0
- package/lib/resources.js +22 -0
- package/package.json +1 -1
- package/types/2020-08-27/Accounts.d.ts +5 -5
- package/types/2020-08-27/Apps/Secrets.d.ts +241 -0
- package/types/2020-08-27/BillingPortal/Configurations.d.ts +1 -1
- package/types/2020-08-27/BillingPortal/Sessions.d.ts +1 -1
- package/types/2020-08-27/Charges.d.ts +8 -0
- package/types/2020-08-27/Checkout/Sessions.d.ts +51 -3
- package/types/2020-08-27/Customers.d.ts +24 -0
- package/types/2020-08-27/Discounts.d.ts +4 -4
- package/types/2020-08-27/FinancialConnections/Accounts.d.ts +63 -0
- package/types/2020-08-27/Invoices.d.ts +3 -0
- package/types/2020-08-27/Issuing/Authorizations.d.ts +22 -0
- package/types/2020-08-27/Issuing/Cards.d.ts +7 -0
- package/types/2020-08-27/Issuing/Disputes.d.ts +29 -0
- package/types/2020-08-27/Issuing/Transactions.d.ts +17 -0
- package/types/2020-08-27/LineItems.d.ts +2 -3
- package/types/2020-08-27/Mandates.d.ts +4 -0
- package/types/2020-08-27/Orders.d.ts +84 -4
- package/types/2020-08-27/PaymentIntents.d.ts +332 -2
- package/types/2020-08-27/PaymentLinks.d.ts +167 -0
- package/types/2020-08-27/PaymentMethods.d.ts +73 -0
- package/types/2020-08-27/PromotionCodes.d.ts +2 -2
- package/types/2020-08-27/Quotes.d.ts +6 -9
- package/types/2020-08-27/Refunds.d.ts +1 -1
- package/types/2020-08-27/SetupAttempts.d.ts +4 -0
- package/types/2020-08-27/SetupIntents.d.ts +157 -0
- package/types/2020-08-27/SubscriptionSchedules.d.ts +15 -0
- package/types/2020-08-27/Subscriptions.d.ts +41 -2
- package/types/2020-08-27/Terminal/Configurations.d.ts +63 -0
- package/types/2020-08-27/TestHelpers/Treasury/InboundTransfers.d.ts +108 -0
- package/types/2020-08-27/TestHelpers/Treasury/OutboundPayments.d.ts +105 -0
- package/types/2020-08-27/TestHelpers/Treasury/OutboundTransfers.d.ts +105 -0
- package/types/2020-08-27/TestHelpers/Treasury/ReceivedCredits.d.ts +93 -0
- package/types/2020-08-27/TestHelpers/Treasury/ReceivedDebits.d.ts +91 -0
- package/types/2020-08-27/Tokens.d.ts +2 -2
- package/types/2020-08-27/Treasury/CreditReversals.d.ts +168 -0
- package/types/2020-08-27/Treasury/DebitReversals.d.ts +187 -0
- package/types/2020-08-27/Treasury/FinancialAccountFeatures.d.ts +622 -0
- package/types/2020-08-27/Treasury/FinancialAccounts.d.ts +833 -0
- package/types/2020-08-27/Treasury/InboundTransfers.d.ts +349 -0
- package/types/2020-08-27/Treasury/OutboundPayments.d.ts +550 -0
- package/types/2020-08-27/Treasury/OutboundTransfers.d.ts +385 -0
- package/types/2020-08-27/Treasury/ReceivedCredits.d.ts +303 -0
- package/types/2020-08-27/Treasury/ReceivedDebits.d.ts +231 -0
- package/types/2020-08-27/Treasury/TransactionEntries.d.ts +257 -0
- package/types/2020-08-27/Treasury/Transactions.d.ts +268 -0
- package/types/2020-08-27/WebhookEndpoints.d.ts +62 -2
- package/types/2020-08-27/index.d.ts +39 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace TestHelpers {
|
|
6
|
+
namespace Treasury {
|
|
7
|
+
interface InboundTransferFailParams {
|
|
8
|
+
/**
|
|
9
|
+
* Specifies which fields in the response should be expanded.
|
|
10
|
+
*/
|
|
11
|
+
expand?: Array<string>;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Details about a failed InboundTransfer.
|
|
15
|
+
*/
|
|
16
|
+
failure_details?: InboundTransferFailParams.FailureDetails;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
namespace InboundTransferFailParams {
|
|
20
|
+
interface FailureDetails {
|
|
21
|
+
/**
|
|
22
|
+
* Reason for the failure.
|
|
23
|
+
*/
|
|
24
|
+
code?: FailureDetails.Code;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
namespace FailureDetails {
|
|
28
|
+
type Code =
|
|
29
|
+
| 'account_closed'
|
|
30
|
+
| 'account_frozen'
|
|
31
|
+
| 'bank_account_restricted'
|
|
32
|
+
| 'bank_ownership_changed'
|
|
33
|
+
| 'debit_not_authorized'
|
|
34
|
+
| 'incorrect_account_holder_address'
|
|
35
|
+
| 'incorrect_account_holder_name'
|
|
36
|
+
| 'incorrect_account_holder_tax_id'
|
|
37
|
+
| 'insufficient_funds'
|
|
38
|
+
| 'invalid_account_number'
|
|
39
|
+
| 'invalid_currency'
|
|
40
|
+
| 'no_account'
|
|
41
|
+
| 'other';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
namespace Treasury {
|
|
47
|
+
interface InboundTransferReturnInboundTransferParams {
|
|
48
|
+
/**
|
|
49
|
+
* Specifies which fields in the response should be expanded.
|
|
50
|
+
*/
|
|
51
|
+
expand?: Array<string>;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
namespace Treasury {
|
|
56
|
+
interface InboundTransferSucceedParams {
|
|
57
|
+
/**
|
|
58
|
+
* Specifies which fields in the response should be expanded.
|
|
59
|
+
*/
|
|
60
|
+
expand?: Array<string>;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
namespace Treasury {
|
|
65
|
+
class InboundTransfersResource {
|
|
66
|
+
/**
|
|
67
|
+
* Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
|
|
68
|
+
*/
|
|
69
|
+
fail(
|
|
70
|
+
id: string,
|
|
71
|
+
params?: InboundTransferFailParams,
|
|
72
|
+
options?: RequestOptions
|
|
73
|
+
): Promise<Stripe.Response<Stripe.Treasury.InboundTransfer>>;
|
|
74
|
+
fail(
|
|
75
|
+
id: string,
|
|
76
|
+
options?: RequestOptions
|
|
77
|
+
): Promise<Stripe.Response<Stripe.Treasury.InboundTransfer>>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
|
|
81
|
+
*/
|
|
82
|
+
returnInboundTransfer(
|
|
83
|
+
id: string,
|
|
84
|
+
params?: InboundTransferReturnInboundTransferParams,
|
|
85
|
+
options?: RequestOptions
|
|
86
|
+
): Promise<Stripe.Response<Stripe.Treasury.InboundTransfer>>;
|
|
87
|
+
returnInboundTransfer(
|
|
88
|
+
id: string,
|
|
89
|
+
options?: RequestOptions
|
|
90
|
+
): Promise<Stripe.Response<Stripe.Treasury.InboundTransfer>>;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
|
|
94
|
+
*/
|
|
95
|
+
succeed(
|
|
96
|
+
id: string,
|
|
97
|
+
params?: InboundTransferSucceedParams,
|
|
98
|
+
options?: RequestOptions
|
|
99
|
+
): Promise<Stripe.Response<Stripe.Treasury.InboundTransfer>>;
|
|
100
|
+
succeed(
|
|
101
|
+
id: string,
|
|
102
|
+
options?: RequestOptions
|
|
103
|
+
): Promise<Stripe.Response<Stripe.Treasury.InboundTransfer>>;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace TestHelpers {
|
|
6
|
+
namespace Treasury {
|
|
7
|
+
interface OutboundPaymentFailParams {
|
|
8
|
+
/**
|
|
9
|
+
* Specifies which fields in the response should be expanded.
|
|
10
|
+
*/
|
|
11
|
+
expand?: Array<string>;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
namespace Treasury {
|
|
16
|
+
interface OutboundPaymentPostParams {
|
|
17
|
+
/**
|
|
18
|
+
* Specifies which fields in the response should be expanded.
|
|
19
|
+
*/
|
|
20
|
+
expand?: Array<string>;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
namespace Treasury {
|
|
25
|
+
interface OutboundPaymentReturnOutboundPaymentParams {
|
|
26
|
+
/**
|
|
27
|
+
* Specifies which fields in the response should be expanded.
|
|
28
|
+
*/
|
|
29
|
+
expand?: Array<string>;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Optional hash to set the the return code.
|
|
33
|
+
*/
|
|
34
|
+
returned_details?: OutboundPaymentReturnOutboundPaymentParams.ReturnedDetails;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
namespace OutboundPaymentReturnOutboundPaymentParams {
|
|
38
|
+
interface ReturnedDetails {
|
|
39
|
+
/**
|
|
40
|
+
* The return code to be set on the OutboundPayment object.
|
|
41
|
+
*/
|
|
42
|
+
code?: ReturnedDetails.Code;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
namespace ReturnedDetails {
|
|
46
|
+
type Code =
|
|
47
|
+
| 'account_closed'
|
|
48
|
+
| 'account_frozen'
|
|
49
|
+
| 'bank_account_restricted'
|
|
50
|
+
| 'bank_ownership_changed'
|
|
51
|
+
| 'declined'
|
|
52
|
+
| 'incorrect_account_holder_name'
|
|
53
|
+
| 'invalid_account_number'
|
|
54
|
+
| 'invalid_currency'
|
|
55
|
+
| 'no_account'
|
|
56
|
+
| 'other';
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
namespace Treasury {
|
|
62
|
+
class OutboundPaymentsResource {
|
|
63
|
+
/**
|
|
64
|
+
* Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
|
|
65
|
+
*/
|
|
66
|
+
fail(
|
|
67
|
+
id: string,
|
|
68
|
+
params?: OutboundPaymentFailParams,
|
|
69
|
+
options?: RequestOptions
|
|
70
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundPayment>>;
|
|
71
|
+
fail(
|
|
72
|
+
id: string,
|
|
73
|
+
options?: RequestOptions
|
|
74
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundPayment>>;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
|
|
78
|
+
*/
|
|
79
|
+
post(
|
|
80
|
+
id: string,
|
|
81
|
+
params?: OutboundPaymentPostParams,
|
|
82
|
+
options?: RequestOptions
|
|
83
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundPayment>>;
|
|
84
|
+
post(
|
|
85
|
+
id: string,
|
|
86
|
+
options?: RequestOptions
|
|
87
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundPayment>>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
|
|
91
|
+
*/
|
|
92
|
+
returnOutboundPayment(
|
|
93
|
+
id: string,
|
|
94
|
+
params?: OutboundPaymentReturnOutboundPaymentParams,
|
|
95
|
+
options?: RequestOptions
|
|
96
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundPayment>>;
|
|
97
|
+
returnOutboundPayment(
|
|
98
|
+
id: string,
|
|
99
|
+
options?: RequestOptions
|
|
100
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundPayment>>;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace TestHelpers {
|
|
6
|
+
namespace Treasury {
|
|
7
|
+
interface OutboundTransferFailParams {
|
|
8
|
+
/**
|
|
9
|
+
* Specifies which fields in the response should be expanded.
|
|
10
|
+
*/
|
|
11
|
+
expand?: Array<string>;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
namespace Treasury {
|
|
16
|
+
interface OutboundTransferPostParams {
|
|
17
|
+
/**
|
|
18
|
+
* Specifies which fields in the response should be expanded.
|
|
19
|
+
*/
|
|
20
|
+
expand?: Array<string>;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
namespace Treasury {
|
|
25
|
+
interface OutboundTransferReturnOutboundTransferParams {
|
|
26
|
+
/**
|
|
27
|
+
* Specifies which fields in the response should be expanded.
|
|
28
|
+
*/
|
|
29
|
+
expand?: Array<string>;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Details about a returned OutboundTransfer.
|
|
33
|
+
*/
|
|
34
|
+
returned_details?: OutboundTransferReturnOutboundTransferParams.ReturnedDetails;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
namespace OutboundTransferReturnOutboundTransferParams {
|
|
38
|
+
interface ReturnedDetails {
|
|
39
|
+
/**
|
|
40
|
+
* Reason for the return.
|
|
41
|
+
*/
|
|
42
|
+
code?: ReturnedDetails.Code;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
namespace ReturnedDetails {
|
|
46
|
+
type Code =
|
|
47
|
+
| 'account_closed'
|
|
48
|
+
| 'account_frozen'
|
|
49
|
+
| 'bank_account_restricted'
|
|
50
|
+
| 'bank_ownership_changed'
|
|
51
|
+
| 'declined'
|
|
52
|
+
| 'incorrect_account_holder_name'
|
|
53
|
+
| 'invalid_account_number'
|
|
54
|
+
| 'invalid_currency'
|
|
55
|
+
| 'no_account'
|
|
56
|
+
| 'other';
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
namespace Treasury {
|
|
62
|
+
class OutboundTransfersResource {
|
|
63
|
+
/**
|
|
64
|
+
* Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
|
|
65
|
+
*/
|
|
66
|
+
fail(
|
|
67
|
+
id: string,
|
|
68
|
+
params?: OutboundTransferFailParams,
|
|
69
|
+
options?: RequestOptions
|
|
70
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundTransfer>>;
|
|
71
|
+
fail(
|
|
72
|
+
id: string,
|
|
73
|
+
options?: RequestOptions
|
|
74
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundTransfer>>;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
|
|
78
|
+
*/
|
|
79
|
+
post(
|
|
80
|
+
id: string,
|
|
81
|
+
params?: OutboundTransferPostParams,
|
|
82
|
+
options?: RequestOptions
|
|
83
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundTransfer>>;
|
|
84
|
+
post(
|
|
85
|
+
id: string,
|
|
86
|
+
options?: RequestOptions
|
|
87
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundTransfer>>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
|
|
91
|
+
*/
|
|
92
|
+
returnOutboundTransfer(
|
|
93
|
+
id: string,
|
|
94
|
+
params?: OutboundTransferReturnOutboundTransferParams,
|
|
95
|
+
options?: RequestOptions
|
|
96
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundTransfer>>;
|
|
97
|
+
returnOutboundTransfer(
|
|
98
|
+
id: string,
|
|
99
|
+
options?: RequestOptions
|
|
100
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundTransfer>>;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace TestHelpers {
|
|
6
|
+
namespace Treasury {
|
|
7
|
+
interface ReceivedCreditCreateParams {
|
|
8
|
+
/**
|
|
9
|
+
* Amount (in cents) to be transferred.
|
|
10
|
+
*/
|
|
11
|
+
amount: number;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
15
|
+
*/
|
|
16
|
+
currency: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The FinancialAccount to send funds to.
|
|
20
|
+
*/
|
|
21
|
+
financial_account: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The rails used for the object.
|
|
25
|
+
*/
|
|
26
|
+
network: ReceivedCreditCreateParams.Network;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
30
|
+
*/
|
|
31
|
+
description?: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Specifies which fields in the response should be expanded.
|
|
35
|
+
*/
|
|
36
|
+
expand?: Array<string>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Initiating payment method details for the object.
|
|
40
|
+
*/
|
|
41
|
+
initiating_payment_method_details?: ReceivedCreditCreateParams.InitiatingPaymentMethodDetails;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
namespace ReceivedCreditCreateParams {
|
|
45
|
+
interface InitiatingPaymentMethodDetails {
|
|
46
|
+
/**
|
|
47
|
+
* The source type.
|
|
48
|
+
*/
|
|
49
|
+
type: 'us_bank_account';
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Optional fields for `us_bank_account`.
|
|
53
|
+
*/
|
|
54
|
+
us_bank_account?: InitiatingPaymentMethodDetails.UsBankAccount;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
namespace InitiatingPaymentMethodDetails {
|
|
58
|
+
interface UsBankAccount {
|
|
59
|
+
/**
|
|
60
|
+
* The bank account holder's name.
|
|
61
|
+
*/
|
|
62
|
+
account_holder_name?: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The bank account number.
|
|
66
|
+
*/
|
|
67
|
+
account_number?: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The bank account's routing number.
|
|
71
|
+
*/
|
|
72
|
+
routing_number?: string;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
type Network = 'ach' | 'us_domestic_wire';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
namespace Treasury {
|
|
81
|
+
class ReceivedCreditsResource {
|
|
82
|
+
/**
|
|
83
|
+
* Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
|
|
84
|
+
*/
|
|
85
|
+
create(
|
|
86
|
+
params: ReceivedCreditCreateParams,
|
|
87
|
+
options?: RequestOptions
|
|
88
|
+
): Promise<Stripe.Response<Stripe.Treasury.ReceivedCredit>>;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace TestHelpers {
|
|
6
|
+
namespace Treasury {
|
|
7
|
+
interface ReceivedDebitCreateParams {
|
|
8
|
+
/**
|
|
9
|
+
* Amount (in cents) to be transferred.
|
|
10
|
+
*/
|
|
11
|
+
amount: number;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
15
|
+
*/
|
|
16
|
+
currency: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The FinancialAccount to pull funds from.
|
|
20
|
+
*/
|
|
21
|
+
financial_account: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The rails used for the object.
|
|
25
|
+
*/
|
|
26
|
+
network: 'ach';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
30
|
+
*/
|
|
31
|
+
description?: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Specifies which fields in the response should be expanded.
|
|
35
|
+
*/
|
|
36
|
+
expand?: Array<string>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Initiating payment method details for the object.
|
|
40
|
+
*/
|
|
41
|
+
initiating_payment_method_details?: ReceivedDebitCreateParams.InitiatingPaymentMethodDetails;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
namespace ReceivedDebitCreateParams {
|
|
45
|
+
interface InitiatingPaymentMethodDetails {
|
|
46
|
+
/**
|
|
47
|
+
* The source type.
|
|
48
|
+
*/
|
|
49
|
+
type: 'us_bank_account';
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Optional fields for `us_bank_account`.
|
|
53
|
+
*/
|
|
54
|
+
us_bank_account?: InitiatingPaymentMethodDetails.UsBankAccount;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
namespace InitiatingPaymentMethodDetails {
|
|
58
|
+
interface UsBankAccount {
|
|
59
|
+
/**
|
|
60
|
+
* The bank account holder's name.
|
|
61
|
+
*/
|
|
62
|
+
account_holder_name?: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The bank account number.
|
|
66
|
+
*/
|
|
67
|
+
account_number?: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The bank account's routing number.
|
|
71
|
+
*/
|
|
72
|
+
routing_number?: string;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
namespace Treasury {
|
|
79
|
+
class ReceivedDebitsResource {
|
|
80
|
+
/**
|
|
81
|
+
* Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
|
|
82
|
+
*/
|
|
83
|
+
create(
|
|
84
|
+
params: ReceivedDebitCreateParams,
|
|
85
|
+
options?: RequestOptions
|
|
86
|
+
): Promise<Stripe.Response<Stripe.Treasury.ReceivedDebit>>;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -351,12 +351,12 @@ declare module 'stripe' {
|
|
|
351
351
|
last_name?: string;
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
|
-
* The Kana
|
|
354
|
+
* The Kana variation of the individual's last name (Japan only).
|
|
355
355
|
*/
|
|
356
356
|
last_name_kana?: string;
|
|
357
357
|
|
|
358
358
|
/**
|
|
359
|
-
* The Kanji
|
|
359
|
+
* The Kanji variation of the individual's last name (Japan only).
|
|
360
360
|
*/
|
|
361
361
|
last_name_kanji?: string;
|
|
362
362
|
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace Treasury {
|
|
6
|
+
/**
|
|
7
|
+
* The CreditReversal object.
|
|
8
|
+
*/
|
|
9
|
+
interface CreditReversal {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier for the object.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
17
|
+
*/
|
|
18
|
+
object: 'treasury.credit_reversal';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Amount (in cents) transferred.
|
|
22
|
+
*/
|
|
23
|
+
amount: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
27
|
+
*/
|
|
28
|
+
currency: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The FinancialAccount to reverse funds from.
|
|
32
|
+
*/
|
|
33
|
+
financial_account: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
|
|
37
|
+
*/
|
|
38
|
+
hosted_regulatory_receipt_url: string | null;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
42
|
+
*/
|
|
43
|
+
livemode: boolean;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 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.
|
|
47
|
+
*/
|
|
48
|
+
metadata: Stripe.Metadata;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The rails used to reverse the funds.
|
|
52
|
+
*/
|
|
53
|
+
network: CreditReversal.Network;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The ReceivedCredit being reversed.
|
|
57
|
+
*/
|
|
58
|
+
received_credit: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Status of the CreditReversal
|
|
62
|
+
*/
|
|
63
|
+
status: CreditReversal.Status;
|
|
64
|
+
|
|
65
|
+
status_transitions: CreditReversal.StatusTransitions;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The Transaction associated with this object.
|
|
69
|
+
*/
|
|
70
|
+
transaction: string | Stripe.Treasury.Transaction | null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
namespace CreditReversal {
|
|
74
|
+
type Network = 'ach' | 'stripe';
|
|
75
|
+
|
|
76
|
+
type Status = 'canceled' | 'posted' | 'processing';
|
|
77
|
+
|
|
78
|
+
interface StatusTransitions {
|
|
79
|
+
/**
|
|
80
|
+
* Timestamp describing when the CreditReversal changed status to `posted`
|
|
81
|
+
*/
|
|
82
|
+
posted_at: number | null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
interface CreditReversalCreateParams {
|
|
87
|
+
/**
|
|
88
|
+
* The ReceivedCredit to reverse.
|
|
89
|
+
*/
|
|
90
|
+
received_credit: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Specifies which fields in the response should be expanded.
|
|
94
|
+
*/
|
|
95
|
+
expand?: Array<string>;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
99
|
+
*/
|
|
100
|
+
metadata?: Stripe.MetadataParam;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
interface CreditReversalRetrieveParams {
|
|
104
|
+
/**
|
|
105
|
+
* Specifies which fields in the response should be expanded.
|
|
106
|
+
*/
|
|
107
|
+
expand?: Array<string>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface CreditReversalListParams extends PaginationParams {
|
|
111
|
+
/**
|
|
112
|
+
* Returns objects associated with this FinancialAccount.
|
|
113
|
+
*/
|
|
114
|
+
financial_account: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Specifies which fields in the response should be expanded.
|
|
118
|
+
*/
|
|
119
|
+
expand?: Array<string>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Only return CreditReversals for the ReceivedCredit ID.
|
|
123
|
+
*/
|
|
124
|
+
received_credit?: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Only return CreditReversals for a given status.
|
|
128
|
+
*/
|
|
129
|
+
status?: CreditReversalListParams.Status;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
namespace CreditReversalListParams {
|
|
133
|
+
type Status = 'canceled' | 'posted' | 'processing';
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
class CreditReversalsResource {
|
|
137
|
+
/**
|
|
138
|
+
* Reverses a ReceivedCredit and creates a CreditReversal object.
|
|
139
|
+
*/
|
|
140
|
+
create(
|
|
141
|
+
params: CreditReversalCreateParams,
|
|
142
|
+
options?: RequestOptions
|
|
143
|
+
): Promise<Stripe.Response<Stripe.Treasury.CreditReversal>>;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list
|
|
147
|
+
*/
|
|
148
|
+
retrieve(
|
|
149
|
+
id: string,
|
|
150
|
+
params?: CreditReversalRetrieveParams,
|
|
151
|
+
options?: RequestOptions
|
|
152
|
+
): Promise<Stripe.Response<Stripe.Treasury.CreditReversal>>;
|
|
153
|
+
retrieve(
|
|
154
|
+
id: string,
|
|
155
|
+
options?: RequestOptions
|
|
156
|
+
): Promise<Stripe.Response<Stripe.Treasury.CreditReversal>>;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Returns a list of CreditReversals.
|
|
160
|
+
*/
|
|
161
|
+
list(
|
|
162
|
+
params: CreditReversalListParams,
|
|
163
|
+
options?: RequestOptions
|
|
164
|
+
): ApiListPromise<Stripe.Treasury.CreditReversal>;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|