Initial project import

This commit is contained in:
drjones
2026-06-13 17:36:44 -07:00
commit ad2a18cc8d
18471 changed files with 4497570 additions and 0 deletions

View File

@@ -0,0 +1,132 @@
import { StripeResource } from '../../StripeResource.js';
import { Transaction } from './Transactions.js';
import { MetadataParam, PaginationParams, Metadata } from '../../shared.js';
import { RequestOptions, ApiListPromise, Response } from '../../lib.js';
export declare class CreditReversalResource extends StripeResource {
/**
* Returns a list of CreditReversals.
*/
list(params: Treasury.CreditReversalListParams, options?: RequestOptions): ApiListPromise<CreditReversal>;
/**
* Reverses a ReceivedCredit and creates a CreditReversal object.
*/
create(params: Treasury.CreditReversalCreateParams, options?: RequestOptions): Promise<Response<CreditReversal>>;
/**
* Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list
*/
retrieve(id: string, params?: Treasury.CreditReversalRetrieveParams, options?: RequestOptions): Promise<Response<CreditReversal>>;
}
export interface CreditReversal {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'treasury.credit_reversal';
/**
* Amount (in cents) transferred.
*/
amount: number;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* 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).
*/
currency: string;
/**
* The FinancialAccount to reverse funds from.
*/
financial_account: string;
/**
* A [hosted transaction receipt](https://docs.stripe.com/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
*/
hosted_regulatory_receipt_url: string | null;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata: Metadata;
/**
* The rails used to reverse the funds.
*/
network: Treasury.CreditReversal.Network;
/**
* The ReceivedCredit being reversed.
*/
received_credit: string;
/**
* Status of the CreditReversal
*/
status: Treasury.CreditReversal.Status;
status_transitions: Treasury.CreditReversal.StatusTransitions;
/**
* The Transaction associated with this object.
*/
transaction: string | Transaction | null;
}
export declare namespace Treasury {
namespace CreditReversal {
type Network = 'ach' | 'stripe';
type Status = 'canceled' | 'posted' | 'processing';
interface StatusTransitions {
/**
* Timestamp describing when the CreditReversal changed status to `posted`
*/
posted_at: number | null;
}
}
}
export declare namespace Treasury {
interface CreditReversalCreateParams {
/**
* The ReceivedCredit to reverse.
*/
received_credit: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Set of [key-value pairs](https://docs.stripe.com/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`.
*/
metadata?: MetadataParam;
}
}
export declare namespace Treasury {
interface CreditReversalRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace Treasury {
interface CreditReversalListParams extends PaginationParams {
/**
* Returns objects associated with this FinancialAccount.
*/
financial_account: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Only return CreditReversals for the ReceivedCredit ID.
*/
received_credit?: string;
/**
* Only return CreditReversals for a given status.
*/
status?: CreditReversalListParams.Status;
}
namespace CreditReversalListParams {
type Status = 'canceled' | 'posted' | 'processing';
}
}

View File

@@ -0,0 +1,29 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.CreditReversalResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class CreditReversalResource extends StripeResource_js_1.StripeResource {
/**
* Returns a list of CreditReversals.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/treasury/credit_reversals', params, options, {
methodType: 'list',
});
}
/**
* Reverses a ReceivedCredit and creates a CreditReversal object.
*/
create(params, options) {
return this._makeRequest('POST', '/v1/treasury/credit_reversals', params, options);
}
/**
* Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/treasury/credit_reversals/${encodeURIComponent(id)}`, params, options);
}
}
exports.CreditReversalResource = CreditReversalResource;
//# sourceMappingURL=CreditReversals.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"CreditReversals.js","sourceRoot":"","sources":["../../../src/resources/Treasury/CreditReversals.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAEvC,+DAAuD;AAKvD,MAAa,sBAAuB,SAAQ,kCAAc;IACxD;;OAEG;IACH,IAAI,CACF,MAAyC,EACzC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,+BAA+B,EAC/B,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,MAA2C,EAC3C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,+BAA+B,EAC/B,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAA8C,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,iCAAiC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EACzD,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF;AA/CD,wDA+CC"}

View File

@@ -0,0 +1,147 @@
import { StripeResource } from '../../StripeResource.js';
import { Transaction } from './Transactions.js';
import { MetadataParam, PaginationParams, Metadata } from '../../shared.js';
import { RequestOptions, ApiListPromise, Response } from '../../lib.js';
export declare class DebitReversalResource extends StripeResource {
/**
* Returns a list of DebitReversals.
*/
list(params: Treasury.DebitReversalListParams, options?: RequestOptions): ApiListPromise<DebitReversal>;
/**
* Reverses a ReceivedDebit and creates a DebitReversal object.
*/
create(params: Treasury.DebitReversalCreateParams, options?: RequestOptions): Promise<Response<DebitReversal>>;
/**
* Retrieves a DebitReversal object.
*/
retrieve(id: string, params?: Treasury.DebitReversalRetrieveParams, options?: RequestOptions): Promise<Response<DebitReversal>>;
}
export interface DebitReversal {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'treasury.debit_reversal';
/**
* Amount (in cents) transferred.
*/
amount: number;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* 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).
*/
currency: string;
/**
* The FinancialAccount to reverse funds from.
*/
financial_account: string | null;
/**
* A [hosted transaction receipt](https://docs.stripe.com/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
*/
hosted_regulatory_receipt_url: string | null;
/**
* Other flows linked to a DebitReversal.
*/
linked_flows: Treasury.DebitReversal.LinkedFlows | null;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata: Metadata;
/**
* The rails used to reverse the funds.
*/
network: Treasury.DebitReversal.Network;
/**
* The ReceivedDebit being reversed.
*/
received_debit: string;
/**
* Status of the DebitReversal
*/
status: Treasury.DebitReversal.Status;
status_transitions: Treasury.DebitReversal.StatusTransitions;
/**
* The Transaction associated with this object.
*/
transaction: string | Transaction | null;
}
export declare namespace Treasury {
namespace DebitReversal {
interface LinkedFlows {
/**
* Set if there is an Issuing dispute associated with the DebitReversal.
*/
issuing_dispute: string | null;
}
type Network = 'ach' | 'card';
type Status = 'failed' | 'processing' | 'succeeded';
interface StatusTransitions {
/**
* Timestamp describing when the DebitReversal changed status to `completed`.
*/
completed_at: number | null;
}
}
}
export declare namespace Treasury {
interface DebitReversalCreateParams {
/**
* The ReceivedDebit to reverse.
*/
received_debit: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Set of [key-value pairs](https://docs.stripe.com/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`.
*/
metadata?: MetadataParam;
}
}
export declare namespace Treasury {
interface DebitReversalRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace Treasury {
interface DebitReversalListParams extends PaginationParams {
/**
* Returns objects associated with this FinancialAccount.
*/
financial_account: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Only return DebitReversals for the ReceivedDebit ID.
*/
received_debit?: string;
/**
* Only return DebitReversals for a given resolution.
*/
resolution?: DebitReversalListParams.Resolution;
/**
* Only return DebitReversals for a given status.
*/
status?: DebitReversalListParams.Status;
}
namespace DebitReversalListParams {
type Resolution = 'lost' | 'won';
type Status = 'canceled' | 'completed' | 'processing';
}
}

View File

@@ -0,0 +1,29 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.DebitReversalResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class DebitReversalResource extends StripeResource_js_1.StripeResource {
/**
* Returns a list of DebitReversals.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/treasury/debit_reversals', params, options, {
methodType: 'list',
});
}
/**
* Reverses a ReceivedDebit and creates a DebitReversal object.
*/
create(params, options) {
return this._makeRequest('POST', '/v1/treasury/debit_reversals', params, options);
}
/**
* Retrieves a DebitReversal object.
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/treasury/debit_reversals/${encodeURIComponent(id)}`, params, options);
}
}
exports.DebitReversalResource = DebitReversalResource;
//# sourceMappingURL=DebitReversals.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"DebitReversals.js","sourceRoot":"","sources":["../../../src/resources/Treasury/DebitReversals.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAEvC,+DAAuD;AAKvD,MAAa,qBAAsB,SAAQ,kCAAc;IACvD;;OAEG;IACH,IAAI,CACF,MAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,8BAA8B,EAC9B,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,MAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,8BAA8B,EAC9B,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,gCAAgC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EACxD,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF;AA/CD,sDA+CC"}

View File

@@ -0,0 +1,402 @@
export interface FinancialAccountFeatures {
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'treasury.financial_account_features';
/**
* Toggle settings for enabling/disabling a feature
*/
card_issuing?: Treasury.FinancialAccountFeatures.CardIssuing;
/**
* Toggle settings for enabling/disabling a feature
*/
deposit_insurance?: Treasury.FinancialAccountFeatures.DepositInsurance;
/**
* Settings related to Financial Addresses features on a Financial Account
*/
financial_addresses?: Treasury.FinancialAccountFeatures.FinancialAddresses;
/**
* InboundTransfers contains inbound transfers features for a FinancialAccount.
*/
inbound_transfers?: Treasury.FinancialAccountFeatures.InboundTransfers;
/**
* Toggle settings for enabling/disabling a feature
*/
intra_stripe_flows?: Treasury.FinancialAccountFeatures.IntraStripeFlows;
/**
* Settings related to Outbound Payments features on a Financial Account
*/
outbound_payments?: Treasury.FinancialAccountFeatures.OutboundPayments;
/**
* OutboundTransfers contains outbound transfers features for a FinancialAccount.
*/
outbound_transfers?: Treasury.FinancialAccountFeatures.OutboundTransfers;
}
export declare namespace Treasury {
namespace FinancialAccountFeatures {
interface CardIssuing {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
/**
* Whether the Feature is operational.
*/
status: CardIssuing.Status;
/**
* Additional details; includes at least one entry when the status is not `active`.
*/
status_details: Array<CardIssuing.StatusDetail>;
}
interface DepositInsurance {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
/**
* Whether the Feature is operational.
*/
status: DepositInsurance.Status;
/**
* Additional details; includes at least one entry when the status is not `active`.
*/
status_details: Array<DepositInsurance.StatusDetail>;
}
interface FinancialAddresses {
/**
* Toggle settings for enabling/disabling the ABA address feature
*/
aba?: FinancialAddresses.Aba;
}
interface InboundTransfers {
/**
* Toggle settings for enabling/disabling an inbound ACH specific feature
*/
ach?: InboundTransfers.Ach;
}
interface IntraStripeFlows {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
/**
* Whether the Feature is operational.
*/
status: IntraStripeFlows.Status;
/**
* Additional details; includes at least one entry when the status is not `active`.
*/
status_details: Array<IntraStripeFlows.StatusDetail>;
}
interface OutboundPayments {
/**
* Toggle settings for enabling/disabling an outbound ACH specific feature
*/
ach?: OutboundPayments.Ach;
/**
* Toggle settings for enabling/disabling a feature
*/
us_domestic_wire?: OutboundPayments.UsDomesticWire;
}
interface OutboundTransfers {
/**
* Toggle settings for enabling/disabling an outbound ACH specific feature
*/
ach?: OutboundTransfers.Ach;
/**
* Toggle settings for enabling/disabling a feature
*/
us_domestic_wire?: OutboundTransfers.UsDomesticWire;
}
namespace CardIssuing {
type Status = 'active' | 'pending' | 'restricted';
interface StatusDetail {
/**
* Represents the reason why the status is `pending` or `restricted`.
*/
code: StatusDetail.Code;
/**
* Represents what the user should do, if anything, to activate the Feature.
*/
resolution: StatusDetail.Resolution | null;
/**
* The `platform_restrictions` that are restricting this Feature.
*/
restriction?: StatusDetail.Restriction;
}
namespace StatusDetail {
type Code = 'activating' | 'capability_not_requested' | 'financial_account_closed' | 'rejected_other' | 'rejected_unsupported_business' | 'requirements_past_due' | 'requirements_pending_verification' | 'restricted_by_platform' | 'restricted_other';
type Resolution = 'contact_stripe' | 'provide_information' | 'remove_restriction';
type Restriction = 'inbound_flows' | 'outbound_flows';
}
}
namespace DepositInsurance {
type Status = 'active' | 'pending' | 'restricted';
interface StatusDetail {
/**
* Represents the reason why the status is `pending` or `restricted`.
*/
code: StatusDetail.Code;
/**
* Represents what the user should do, if anything, to activate the Feature.
*/
resolution: StatusDetail.Resolution | null;
/**
* The `platform_restrictions` that are restricting this Feature.
*/
restriction?: StatusDetail.Restriction;
}
namespace StatusDetail {
type Code = 'activating' | 'capability_not_requested' | 'financial_account_closed' | 'rejected_other' | 'rejected_unsupported_business' | 'requirements_past_due' | 'requirements_pending_verification' | 'restricted_by_platform' | 'restricted_other';
type Resolution = 'contact_stripe' | 'provide_information' | 'remove_restriction';
type Restriction = 'inbound_flows' | 'outbound_flows';
}
}
namespace FinancialAddresses {
interface Aba {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
/**
* Whether the Feature is operational.
*/
status: Aba.Status;
/**
* Additional details; includes at least one entry when the status is not `active`.
*/
status_details: Array<Aba.StatusDetail>;
}
namespace Aba {
type Status = 'active' | 'pending' | 'restricted';
interface StatusDetail {
/**
* Represents the reason why the status is `pending` or `restricted`.
*/
code: StatusDetail.Code;
/**
* Represents what the user should do, if anything, to activate the Feature.
*/
resolution: StatusDetail.Resolution | null;
/**
* The `platform_restrictions` that are restricting this Feature.
*/
restriction?: StatusDetail.Restriction;
}
namespace StatusDetail {
type Code = 'activating' | 'capability_not_requested' | 'financial_account_closed' | 'rejected_other' | 'rejected_unsupported_business' | 'requirements_past_due' | 'requirements_pending_verification' | 'restricted_by_platform' | 'restricted_other';
type Resolution = 'contact_stripe' | 'provide_information' | 'remove_restriction';
type Restriction = 'inbound_flows' | 'outbound_flows';
}
}
}
namespace InboundTransfers {
interface Ach {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
/**
* Whether the Feature is operational.
*/
status: Ach.Status;
/**
* Additional details; includes at least one entry when the status is not `active`.
*/
status_details: Array<Ach.StatusDetail>;
}
namespace Ach {
type Status = 'active' | 'pending' | 'restricted';
interface StatusDetail {
/**
* Represents the reason why the status is `pending` or `restricted`.
*/
code: StatusDetail.Code;
/**
* Represents what the user should do, if anything, to activate the Feature.
*/
resolution: StatusDetail.Resolution | null;
/**
* The `platform_restrictions` that are restricting this Feature.
*/
restriction?: StatusDetail.Restriction;
}
namespace StatusDetail {
type Code = 'activating' | 'capability_not_requested' | 'financial_account_closed' | 'rejected_other' | 'rejected_unsupported_business' | 'requirements_past_due' | 'requirements_pending_verification' | 'restricted_by_platform' | 'restricted_other';
type Resolution = 'contact_stripe' | 'provide_information' | 'remove_restriction';
type Restriction = 'inbound_flows' | 'outbound_flows';
}
}
}
namespace IntraStripeFlows {
type Status = 'active' | 'pending' | 'restricted';
interface StatusDetail {
/**
* Represents the reason why the status is `pending` or `restricted`.
*/
code: StatusDetail.Code;
/**
* Represents what the user should do, if anything, to activate the Feature.
*/
resolution: StatusDetail.Resolution | null;
/**
* The `platform_restrictions` that are restricting this Feature.
*/
restriction?: StatusDetail.Restriction;
}
namespace StatusDetail {
type Code = 'activating' | 'capability_not_requested' | 'financial_account_closed' | 'rejected_other' | 'rejected_unsupported_business' | 'requirements_past_due' | 'requirements_pending_verification' | 'restricted_by_platform' | 'restricted_other';
type Resolution = 'contact_stripe' | 'provide_information' | 'remove_restriction';
type Restriction = 'inbound_flows' | 'outbound_flows';
}
}
namespace OutboundPayments {
interface Ach {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
/**
* Whether the Feature is operational.
*/
status: Ach.Status;
/**
* Additional details; includes at least one entry when the status is not `active`.
*/
status_details: Array<Ach.StatusDetail>;
}
interface UsDomesticWire {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
/**
* Whether the Feature is operational.
*/
status: UsDomesticWire.Status;
/**
* Additional details; includes at least one entry when the status is not `active`.
*/
status_details: Array<UsDomesticWire.StatusDetail>;
}
namespace Ach {
type Status = 'active' | 'pending' | 'restricted';
interface StatusDetail {
/**
* Represents the reason why the status is `pending` or `restricted`.
*/
code: StatusDetail.Code;
/**
* Represents what the user should do, if anything, to activate the Feature.
*/
resolution: StatusDetail.Resolution | null;
/**
* The `platform_restrictions` that are restricting this Feature.
*/
restriction?: StatusDetail.Restriction;
}
namespace StatusDetail {
type Code = 'activating' | 'capability_not_requested' | 'financial_account_closed' | 'rejected_other' | 'rejected_unsupported_business' | 'requirements_past_due' | 'requirements_pending_verification' | 'restricted_by_platform' | 'restricted_other';
type Resolution = 'contact_stripe' | 'provide_information' | 'remove_restriction';
type Restriction = 'inbound_flows' | 'outbound_flows';
}
}
namespace UsDomesticWire {
type Status = 'active' | 'pending' | 'restricted';
interface StatusDetail {
/**
* Represents the reason why the status is `pending` or `restricted`.
*/
code: StatusDetail.Code;
/**
* Represents what the user should do, if anything, to activate the Feature.
*/
resolution: StatusDetail.Resolution | null;
/**
* The `platform_restrictions` that are restricting this Feature.
*/
restriction?: StatusDetail.Restriction;
}
namespace StatusDetail {
type Code = 'activating' | 'capability_not_requested' | 'financial_account_closed' | 'rejected_other' | 'rejected_unsupported_business' | 'requirements_past_due' | 'requirements_pending_verification' | 'restricted_by_platform' | 'restricted_other';
type Resolution = 'contact_stripe' | 'provide_information' | 'remove_restriction';
type Restriction = 'inbound_flows' | 'outbound_flows';
}
}
}
namespace OutboundTransfers {
interface Ach {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
/**
* Whether the Feature is operational.
*/
status: Ach.Status;
/**
* Additional details; includes at least one entry when the status is not `active`.
*/
status_details: Array<Ach.StatusDetail>;
}
interface UsDomesticWire {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
/**
* Whether the Feature is operational.
*/
status: UsDomesticWire.Status;
/**
* Additional details; includes at least one entry when the status is not `active`.
*/
status_details: Array<UsDomesticWire.StatusDetail>;
}
namespace Ach {
type Status = 'active' | 'pending' | 'restricted';
interface StatusDetail {
/**
* Represents the reason why the status is `pending` or `restricted`.
*/
code: StatusDetail.Code;
/**
* Represents what the user should do, if anything, to activate the Feature.
*/
resolution: StatusDetail.Resolution | null;
/**
* The `platform_restrictions` that are restricting this Feature.
*/
restriction?: StatusDetail.Restriction;
}
namespace StatusDetail {
type Code = 'activating' | 'capability_not_requested' | 'financial_account_closed' | 'rejected_other' | 'rejected_unsupported_business' | 'requirements_past_due' | 'requirements_pending_verification' | 'restricted_by_platform' | 'restricted_other';
type Resolution = 'contact_stripe' | 'provide_information' | 'remove_restriction';
type Restriction = 'inbound_flows' | 'outbound_flows';
}
}
namespace UsDomesticWire {
type Status = 'active' | 'pending' | 'restricted';
interface StatusDetail {
/**
* Represents the reason why the status is `pending` or `restricted`.
*/
code: StatusDetail.Code;
/**
* Represents what the user should do, if anything, to activate the Feature.
*/
resolution: StatusDetail.Resolution | null;
/**
* The `platform_restrictions` that are restricting this Feature.
*/
restriction?: StatusDetail.Restriction;
}
namespace StatusDetail {
type Code = 'activating' | 'capability_not_requested' | 'financial_account_closed' | 'rejected_other' | 'rejected_unsupported_business' | 'requirements_past_due' | 'requirements_pending_verification' | 'restricted_by_platform' | 'restricted_other';
type Resolution = 'contact_stripe' | 'provide_information' | 'remove_restriction';
type Restriction = 'inbound_flows' | 'outbound_flows';
}
}
}
}
}

View File

@@ -0,0 +1,4 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=FinancialAccountFeatures.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FinancialAccountFeatures.js","sourceRoot":"","sources":["../../../src/resources/Treasury/FinancialAccountFeatures.ts"],"names":[],"mappings":";AAAA,uCAAuC"}

View File

@@ -0,0 +1,756 @@
import { StripeResource } from '../../StripeResource.js';
import { FinancialAccountFeatures } from './FinancialAccountFeatures.js';
import { MetadataParam, Emptyable, PaginationParams, RangeQueryParam, Metadata } from '../../shared.js';
import { RequestOptions, ApiListPromise, Response } from '../../lib.js';
export declare class FinancialAccountResource extends StripeResource {
/**
* Returns a list of FinancialAccounts.
*/
list(params?: Treasury.FinancialAccountListParams, options?: RequestOptions): ApiListPromise<FinancialAccount>;
/**
* Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts by default.
*/
create(params: Treasury.FinancialAccountCreateParams, options?: RequestOptions): Promise<Response<FinancialAccount>>;
/**
* Retrieves the details of a FinancialAccount.
*/
retrieve(id: string, params?: Treasury.FinancialAccountRetrieveParams, options?: RequestOptions): Promise<Response<FinancialAccount>>;
/**
* Updates the details of a FinancialAccount.
*/
update(id: string, params?: Treasury.FinancialAccountUpdateParams, options?: RequestOptions): Promise<Response<FinancialAccount>>;
/**
* Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards.
*/
close(id: string, params?: Treasury.FinancialAccountCloseParams, options?: RequestOptions): Promise<Response<FinancialAccount>>;
/**
* Updates the Features associated with a FinancialAccount.
*/
updateFeatures(id: string, params?: Treasury.FinancialAccountUpdateFeaturesParams, options?: RequestOptions): Promise<Response<FinancialAccountFeatures>>;
/**
* Retrieves Features information associated with the FinancialAccount.
*/
retrieveFeatures(id: string, params?: Treasury.FinancialAccountRetrieveFeaturesParams, options?: RequestOptions): Promise<Response<FinancialAccountFeatures>>;
}
export interface FinancialAccount {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'treasury.financial_account';
/**
* The array of paths to active Features in the Features hash.
*/
active_features?: Array<Treasury.FinancialAccount.ActiveFeature>;
/**
* Balance information for the FinancialAccount
*/
balance: Treasury.FinancialAccount.Balance;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country: string;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`.
* Stripe or the platform can control Features via the requested field.
*/
features?: FinancialAccountFeatures;
/**
* The set of credentials that resolve to a FinancialAccount.
*/
financial_addresses: Array<Treasury.FinancialAccount.FinancialAddress>;
is_default?: boolean;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata: Metadata | null;
/**
* The nickname for the FinancialAccount.
*/
nickname?: string | null;
/**
* The array of paths to pending Features in the Features hash.
*/
pending_features?: Array<Treasury.FinancialAccount.PendingFeature>;
/**
* The set of functionalities that the platform can restrict on the FinancialAccount.
*/
platform_restrictions?: Treasury.FinancialAccount.PlatformRestrictions | null;
/**
* The array of paths to restricted Features in the Features hash.
*/
restricted_features?: Array<Treasury.FinancialAccount.RestrictedFeature>;
/**
* Status of this FinancialAccount.
*/
status: Treasury.FinancialAccount.Status;
status_details: Treasury.FinancialAccount.StatusDetails;
/**
* The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
*/
supported_currencies: Array<string>;
}
export declare namespace Treasury {
namespace FinancialAccount {
type ActiveFeature = 'card_issuing' | 'deposit_insurance' | 'financial_addresses.aba' | 'financial_addresses.aba.forwarding' | 'inbound_transfers.ach' | 'intra_stripe_flows' | 'outbound_payments.ach' | 'outbound_payments.us_domestic_wire' | 'outbound_transfers.ach' | 'outbound_transfers.us_domestic_wire' | 'remote_deposit_capture';
interface Balance {
/**
* Funds the user can spend right now.
*/
cash: {
[key: string]: number;
};
/**
* Funds not spendable yet, but will become available at a later time.
*/
inbound_pending: {
[key: string]: number;
};
/**
* Funds in the account, but not spendable because they are being held for pending outbound flows.
*/
outbound_pending: {
[key: string]: number;
};
}
interface FinancialAddress {
/**
* ABA Records contain U.S. bank account details per the ABA format.
*/
aba?: FinancialAddress.Aba;
/**
* The list of networks that the address supports
*/
supported_networks?: Array<FinancialAddress.SupportedNetwork>;
/**
* The type of financial address
*/
type: 'aba';
}
type PendingFeature = 'card_issuing' | 'deposit_insurance' | 'financial_addresses.aba' | 'financial_addresses.aba.forwarding' | 'inbound_transfers.ach' | 'intra_stripe_flows' | 'outbound_payments.ach' | 'outbound_payments.us_domestic_wire' | 'outbound_transfers.ach' | 'outbound_transfers.us_domestic_wire' | 'remote_deposit_capture';
interface PlatformRestrictions {
/**
* Restricts all inbound money movement.
*/
inbound_flows: PlatformRestrictions.InboundFlows | null;
/**
* Restricts all outbound money movement.
*/
outbound_flows: PlatformRestrictions.OutboundFlows | null;
}
type RestrictedFeature = 'card_issuing' | 'deposit_insurance' | 'financial_addresses.aba' | 'financial_addresses.aba.forwarding' | 'inbound_transfers.ach' | 'intra_stripe_flows' | 'outbound_payments.ach' | 'outbound_payments.us_domestic_wire' | 'outbound_transfers.ach' | 'outbound_transfers.us_domestic_wire' | 'remote_deposit_capture';
type Status = 'closed' | 'open';
interface StatusDetails {
/**
* Details related to the closure of this FinancialAccount
*/
closed: StatusDetails.Closed | null;
}
namespace FinancialAddress {
interface Aba {
/**
* The name of the person or business that owns the bank account.
*/
account_holder_name: string;
/**
* The account number.
*/
account_number?: string | null;
/**
* The last four characters of the account number.
*/
account_number_last4: string;
/**
* Name of the bank.
*/
bank_name: string;
/**
* Routing number for the account.
*/
routing_number: string;
}
type SupportedNetwork = 'ach' | 'us_domestic_wire';
}
namespace PlatformRestrictions {
type InboundFlows = 'restricted' | 'unrestricted';
type OutboundFlows = 'restricted' | 'unrestricted';
}
namespace StatusDetails {
interface Closed {
/**
* The array that contains reasons for a FinancialAccount closure.
*/
reasons: Array<Closed.Reason>;
}
namespace Closed {
type Reason = 'account_rejected' | 'closed_by_platform' | 'other';
}
}
}
}
export declare namespace Treasury {
interface FinancialAccountCreateParams {
/**
* The currencies the FinancialAccount can hold a balance in.
*/
supported_currencies: Array<string>;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.
*/
features?: FinancialAccountCreateParams.Features;
/**
* Set of [key-value pairs](https://docs.stripe.com/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`.
*/
metadata?: MetadataParam;
/**
* The nickname for the FinancialAccount.
*/
nickname?: Emptyable<string>;
/**
* The set of functionalities that the platform can restrict on the FinancialAccount.
*/
platform_restrictions?: FinancialAccountCreateParams.PlatformRestrictions;
}
namespace FinancialAccountCreateParams {
interface Features {
/**
* Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
*/
card_issuing?: Features.CardIssuing;
/**
* Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
*/
deposit_insurance?: Features.DepositInsurance;
/**
* Contains Features that add FinancialAddresses to the FinancialAccount.
*/
financial_addresses?: Features.FinancialAddresses;
/**
* Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
*/
inbound_transfers?: Features.InboundTransfers;
/**
* Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
*/
intra_stripe_flows?: Features.IntraStripeFlows;
/**
* Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
*/
outbound_payments?: Features.OutboundPayments;
/**
* Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
*/
outbound_transfers?: Features.OutboundTransfers;
}
interface PlatformRestrictions {
/**
* Restricts all inbound money movement.
*/
inbound_flows?: PlatformRestrictions.InboundFlows;
/**
* Restricts all outbound money movement.
*/
outbound_flows?: PlatformRestrictions.OutboundFlows;
}
namespace Features {
interface CardIssuing {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface DepositInsurance {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface FinancialAddresses {
/**
* Adds an ABA FinancialAddress to the FinancialAccount.
*/
aba?: FinancialAddresses.Aba;
}
interface InboundTransfers {
/**
* Enables ACH Debits via the InboundTransfers API.
*/
ach?: InboundTransfers.Ach;
}
interface IntraStripeFlows {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface OutboundPayments {
/**
* Enables ACH transfers via the OutboundPayments API.
*/
ach?: OutboundPayments.Ach;
/**
* Enables US domestic wire transfers via the OutboundPayments API.
*/
us_domestic_wire?: OutboundPayments.UsDomesticWire;
}
interface OutboundTransfers {
/**
* Enables ACH transfers via the OutboundTransfers API.
*/
ach?: OutboundTransfers.Ach;
/**
* Enables US domestic wire transfers via the OutboundTransfers API.
*/
us_domestic_wire?: OutboundTransfers.UsDomesticWire;
}
namespace FinancialAddresses {
interface Aba {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
}
namespace InboundTransfers {
interface Ach {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
}
namespace OutboundPayments {
interface Ach {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface UsDomesticWire {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
}
namespace OutboundTransfers {
interface Ach {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface UsDomesticWire {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
}
}
namespace PlatformRestrictions {
type InboundFlows = 'restricted' | 'unrestricted';
type OutboundFlows = 'restricted' | 'unrestricted';
}
}
}
export declare namespace Treasury {
interface FinancialAccountRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace Treasury {
interface FinancialAccountUpdateParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field.
*/
features?: FinancialAccountUpdateParams.Features;
/**
* A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0
*/
forwarding_settings?: FinancialAccountUpdateParams.ForwardingSettings;
/**
* Set of [key-value pairs](https://docs.stripe.com/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`.
*/
metadata?: MetadataParam;
/**
* The nickname for the FinancialAccount.
*/
nickname?: Emptyable<string>;
/**
* The set of functionalities that the platform can restrict on the FinancialAccount.
*/
platform_restrictions?: FinancialAccountUpdateParams.PlatformRestrictions;
}
namespace FinancialAccountUpdateParams {
interface Features {
/**
* Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
*/
card_issuing?: Features.CardIssuing;
/**
* Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
*/
deposit_insurance?: Features.DepositInsurance;
/**
* Contains Features that add FinancialAddresses to the FinancialAccount.
*/
financial_addresses?: Features.FinancialAddresses;
/**
* Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
*/
inbound_transfers?: Features.InboundTransfers;
/**
* Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
*/
intra_stripe_flows?: Features.IntraStripeFlows;
/**
* Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
*/
outbound_payments?: Features.OutboundPayments;
/**
* Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
*/
outbound_transfers?: Features.OutboundTransfers;
}
interface ForwardingSettings {
/**
* The financial_account id
*/
financial_account?: string;
/**
* The payment_method or bank account id. This needs to be a verified bank account.
*/
payment_method?: string;
/**
* The type of the bank account provided. This can be either "financial_account" or "payment_method"
*/
type: ForwardingSettings.Type;
}
interface PlatformRestrictions {
/**
* Restricts all inbound money movement.
*/
inbound_flows?: PlatformRestrictions.InboundFlows;
/**
* Restricts all outbound money movement.
*/
outbound_flows?: PlatformRestrictions.OutboundFlows;
}
namespace Features {
interface CardIssuing {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface DepositInsurance {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface FinancialAddresses {
/**
* Adds an ABA FinancialAddress to the FinancialAccount.
*/
aba?: FinancialAddresses.Aba;
}
interface InboundTransfers {
/**
* Enables ACH Debits via the InboundTransfers API.
*/
ach?: InboundTransfers.Ach;
}
interface IntraStripeFlows {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface OutboundPayments {
/**
* Enables ACH transfers via the OutboundPayments API.
*/
ach?: OutboundPayments.Ach;
/**
* Enables US domestic wire transfers via the OutboundPayments API.
*/
us_domestic_wire?: OutboundPayments.UsDomesticWire;
}
interface OutboundTransfers {
/**
* Enables ACH transfers via the OutboundTransfers API.
*/
ach?: OutboundTransfers.Ach;
/**
* Enables US domestic wire transfers via the OutboundTransfers API.
*/
us_domestic_wire?: OutboundTransfers.UsDomesticWire;
}
namespace FinancialAddresses {
interface Aba {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
}
namespace InboundTransfers {
interface Ach {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
}
namespace OutboundPayments {
interface Ach {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface UsDomesticWire {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
}
namespace OutboundTransfers {
interface Ach {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface UsDomesticWire {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
}
}
namespace ForwardingSettings {
type Type = 'financial_account' | 'payment_method';
}
namespace PlatformRestrictions {
type InboundFlows = 'restricted' | 'unrestricted';
type OutboundFlows = 'restricted' | 'unrestricted';
}
}
}
export declare namespace Treasury {
interface FinancialAccountListParams extends PaginationParams {
/**
* Only return FinancialAccounts that were created during the given date interval.
*/
created?: RangeQueryParam | number;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Only return FinancialAccounts that have the given status: `open` or `closed`
*/
status?: FinancialAccountListParams.Status;
}
namespace FinancialAccountListParams {
type Status = 'closed' | 'open';
}
}
export declare namespace Treasury {
interface FinancialAccountCloseParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0
*/
forwarding_settings?: FinancialAccountCloseParams.ForwardingSettings;
}
namespace FinancialAccountCloseParams {
interface ForwardingSettings {
/**
* The financial_account id
*/
financial_account?: string;
/**
* The payment_method or bank account id. This needs to be a verified bank account.
*/
payment_method?: string;
/**
* The type of the bank account provided. This can be either "financial_account" or "payment_method"
*/
type: ForwardingSettings.Type;
}
namespace ForwardingSettings {
type Type = 'financial_account' | 'payment_method';
}
}
}
export declare namespace Treasury {
interface FinancialAccountRetrieveFeaturesParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace Treasury {
interface FinancialAccountUpdateFeaturesParams {
/**
* Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
*/
card_issuing?: FinancialAccountUpdateFeaturesParams.CardIssuing;
/**
* Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
*/
deposit_insurance?: FinancialAccountUpdateFeaturesParams.DepositInsurance;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Contains Features that add FinancialAddresses to the FinancialAccount.
*/
financial_addresses?: FinancialAccountUpdateFeaturesParams.FinancialAddresses;
/**
* Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
*/
inbound_transfers?: FinancialAccountUpdateFeaturesParams.InboundTransfers;
/**
* Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
*/
intra_stripe_flows?: FinancialAccountUpdateFeaturesParams.IntraStripeFlows;
/**
* Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
*/
outbound_payments?: FinancialAccountUpdateFeaturesParams.OutboundPayments;
/**
* Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
*/
outbound_transfers?: FinancialAccountUpdateFeaturesParams.OutboundTransfers;
}
namespace FinancialAccountUpdateFeaturesParams {
interface CardIssuing {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface DepositInsurance {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface FinancialAddresses {
/**
* Adds an ABA FinancialAddress to the FinancialAccount.
*/
aba?: FinancialAddresses.Aba;
}
interface InboundTransfers {
/**
* Enables ACH Debits via the InboundTransfers API.
*/
ach?: InboundTransfers.Ach;
}
interface IntraStripeFlows {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface OutboundPayments {
/**
* Enables ACH transfers via the OutboundPayments API.
*/
ach?: OutboundPayments.Ach;
/**
* Enables US domestic wire transfers via the OutboundPayments API.
*/
us_domestic_wire?: OutboundPayments.UsDomesticWire;
}
interface OutboundTransfers {
/**
* Enables ACH transfers via the OutboundTransfers API.
*/
ach?: OutboundTransfers.Ach;
/**
* Enables US domestic wire transfers via the OutboundTransfers API.
*/
us_domestic_wire?: OutboundTransfers.UsDomesticWire;
}
namespace FinancialAddresses {
interface Aba {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
}
namespace InboundTransfers {
interface Ach {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
}
namespace OutboundPayments {
interface Ach {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface UsDomesticWire {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
}
namespace OutboundTransfers {
interface Ach {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
interface UsDomesticWire {
/**
* Whether the FinancialAccount should have the Feature.
*/
requested: boolean;
}
}
}
}

View File

@@ -0,0 +1,53 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.FinancialAccountResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class FinancialAccountResource extends StripeResource_js_1.StripeResource {
/**
* Returns a list of FinancialAccounts.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/treasury/financial_accounts', params, options, {
methodType: 'list',
});
}
/**
* Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts by default.
*/
create(params, options) {
return this._makeRequest('POST', '/v1/treasury/financial_accounts', params, options);
}
/**
* Retrieves the details of a FinancialAccount.
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/treasury/financial_accounts/${encodeURIComponent(id)}`, params, options);
}
/**
* Updates the details of a FinancialAccount.
*/
update(id, params, options) {
return this._makeRequest('POST', `/v1/treasury/financial_accounts/${encodeURIComponent(id)}`, params, options);
}
/**
* Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards.
*/
close(id, params, options) {
return this._makeRequest('POST', `/v1/treasury/financial_accounts/${encodeURIComponent(id)}/close`, params, options);
}
/**
* Updates the Features associated with a FinancialAccount.
*/
updateFeatures(id, params, options) {
return this._makeRequest('POST', `/v1/treasury/financial_accounts/${encodeURIComponent(id)}/features`, params, options);
}
/**
* Retrieves Features information associated with the FinancialAccount.
*/
retrieveFeatures(id, params, options) {
return this._makeRequest('GET', `/v1/treasury/financial_accounts/${encodeURIComponent(id)}/features`, params, options);
}
}
exports.FinancialAccountResource = FinancialAccountResource;
//# sourceMappingURL=FinancialAccounts.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FinancialAccounts.js","sourceRoot":"","sources":["../../../src/resources/Treasury/FinancialAccounts.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAEvC,+DAAuD;AAWvD,MAAa,wBAAyB,SAAQ,kCAAc;IAC1D;;OAEG;IACH,IAAI,CACF,MAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,iCAAiC,EACjC,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,MAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,iCAAiC,EACjC,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAAgD,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,mCAAmC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAC3D,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,MAA8C,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,mCAAmC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAC3D,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,KAAK,CACH,EAAU,EACV,MAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,mCAAmC,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EACjE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,cAAc,CACZ,EAAU,EACV,MAAsD,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,mCAAmC,kBAAkB,CAAC,EAAE,CAAC,WAAW,EACpE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,gBAAgB,CACd,EAAU,EACV,MAAwD,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,mCAAmC,kBAAkB,CAAC,EAAE,CAAC,WAAW,EACpE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF;AA3GD,4DA2GC"}

View File

@@ -0,0 +1,263 @@
import { StripeResource } from '../../StripeResource.js';
import { Transaction } from './Transactions.js';
import { Mandate } from './../Mandates.js';
import { MetadataParam, PaginationParams, Metadata, Address } from '../../shared.js';
import { RequestOptions, ApiListPromise, Response } from '../../lib.js';
export declare class InboundTransferResource extends StripeResource {
/**
* Returns a list of InboundTransfers sent from the specified FinancialAccount.
*/
list(params: Treasury.InboundTransferListParams, options?: RequestOptions): ApiListPromise<InboundTransfer>;
/**
* Creates an InboundTransfer.
*/
create(params: Treasury.InboundTransferCreateParams, options?: RequestOptions): Promise<Response<InboundTransfer>>;
/**
* Retrieves the details of an existing InboundTransfer.
*/
retrieve(id: string, params?: Treasury.InboundTransferRetrieveParams, options?: RequestOptions): Promise<Response<InboundTransfer>>;
/**
* Cancels an InboundTransfer.
*/
cancel(id: string, params?: Treasury.InboundTransferCancelParams, options?: RequestOptions): Promise<Response<InboundTransfer>>;
}
export interface InboundTransfer {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'treasury.inbound_transfer';
/**
* Amount (in cents) transferred.
*/
amount: number;
/**
* Returns `true` if the InboundTransfer is able to be canceled.
*/
cancelable: boolean;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* 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).
*/
currency: string;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description: string | null;
/**
* Details about this InboundTransfer's failure. Only set when status is `failed`.
*/
failure_details: Treasury.InboundTransfer.FailureDetails | null;
/**
* The FinancialAccount that received the funds.
*/
financial_account: string;
/**
* A [hosted transaction receipt](https://docs.stripe.com/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
*/
hosted_regulatory_receipt_url: string | null;
linked_flows: Treasury.InboundTransfer.LinkedFlows;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata: Metadata;
/**
* The origin payment method to be debited for an InboundTransfer.
*/
origin_payment_method: string | null;
/**
* Details about the PaymentMethod for an InboundTransfer.
*/
origin_payment_method_details: Treasury.InboundTransfer.OriginPaymentMethodDetails | null;
/**
* Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state.
*/
returned: boolean | null;
/**
* Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`.
*/
statement_descriptor: string;
/**
* Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails.
*/
status: Treasury.InboundTransfer.Status;
status_transitions: Treasury.InboundTransfer.StatusTransitions;
/**
* The Transaction associated with this object.
*/
transaction: string | Transaction | null;
}
export declare namespace Treasury {
namespace InboundTransfer {
interface FailureDetails {
/**
* Reason for the failure.
*/
code: FailureDetails.Code;
}
interface LinkedFlows {
/**
* If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return.
*/
received_debit: string | null;
}
interface OriginPaymentMethodDetails {
billing_details: OriginPaymentMethodDetails.BillingDetails;
/**
* The type of the payment method used in the InboundTransfer.
*/
type: 'us_bank_account';
us_bank_account?: OriginPaymentMethodDetails.UsBankAccount;
}
type Status = 'canceled' | 'failed' | 'processing' | 'succeeded';
interface StatusTransitions {
/**
* Timestamp describing when an InboundTransfer changed status to `canceled`.
*/
canceled_at?: number | null;
/**
* Timestamp describing when an InboundTransfer changed status to `failed`.
*/
failed_at: number | null;
/**
* Timestamp describing when an InboundTransfer changed status to `succeeded`.
*/
succeeded_at: number | null;
}
namespace FailureDetails {
type Code = 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'debit_not_authorized' | 'incorrect_account_holder_address' | 'incorrect_account_holder_name' | 'incorrect_account_holder_tax_id' | 'insufficient_funds' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other';
}
namespace OriginPaymentMethodDetails {
interface BillingDetails {
address: Address;
/**
* Email address.
*/
email: string | null;
/**
* Full name.
*/
name: string | null;
}
interface UsBankAccount {
/**
* Account holder type: individual or company.
*/
account_holder_type: UsBankAccount.AccountHolderType | null;
/**
* Account type: checkings or savings. Defaults to checking if omitted.
*/
account_type: UsBankAccount.AccountType | null;
/**
* Name of the bank associated with the bank account.
*/
bank_name: string | null;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* Last four digits of the bank account number.
*/
last4: string | null;
/**
* ID of the mandate used to make this payment.
*/
mandate?: string | Mandate;
/**
* The network rails used. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
*/
network: 'ach';
/**
* Routing number of the bank account.
*/
routing_number: string | null;
}
namespace UsBankAccount {
type AccountHolderType = 'company' | 'individual';
type AccountType = 'checking' | 'savings';
}
}
}
}
export declare namespace Treasury {
interface InboundTransferCreateParams {
/**
* Amount (in cents) to be transferred.
*/
amount: number;
/**
* 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).
*/
currency: string;
/**
* The FinancialAccount to send funds to.
*/
financial_account: string;
/**
* The origin payment method to be debited for the InboundTransfer.
*/
origin_payment_method: string;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description?: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Set of [key-value pairs](https://docs.stripe.com/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`.
*/
metadata?: MetadataParam;
/**
* The complete description that appears on your customers' statements. Maximum 10 characters. Can only include -#.$&*, spaces, and alphanumeric characters.
*/
statement_descriptor?: string;
}
}
export declare namespace Treasury {
interface InboundTransferRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace Treasury {
interface InboundTransferListParams extends PaginationParams {
/**
* Returns objects associated with this FinancialAccount.
*/
financial_account: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`.
*/
status?: InboundTransferListParams.Status;
}
namespace InboundTransferListParams {
type Status = 'canceled' | 'failed' | 'processing' | 'succeeded';
}
}
export declare namespace Treasury {
interface InboundTransferCancelParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}

View File

@@ -0,0 +1,35 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.InboundTransferResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class InboundTransferResource extends StripeResource_js_1.StripeResource {
/**
* Returns a list of InboundTransfers sent from the specified FinancialAccount.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/treasury/inbound_transfers', params, options, {
methodType: 'list',
});
}
/**
* Creates an InboundTransfer.
*/
create(params, options) {
return this._makeRequest('POST', '/v1/treasury/inbound_transfers', params, options);
}
/**
* Retrieves the details of an existing InboundTransfer.
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/treasury/inbound_transfers/${encodeURIComponent(id)}`, params, options);
}
/**
* Cancels an InboundTransfer.
*/
cancel(id, params, options) {
return this._makeRequest('POST', `/v1/treasury/inbound_transfers/${encodeURIComponent(id)}/cancel`, params, options);
}
}
exports.InboundTransferResource = InboundTransferResource;
//# sourceMappingURL=InboundTransfers.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"InboundTransfers.js","sourceRoot":"","sources":["../../../src/resources/Treasury/InboundTransfers.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAEvC,+DAAuD;AAWvD,MAAa,uBAAwB,SAAQ,kCAAc;IACzD;;OAEG;IACH,IAAI,CACF,MAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,gCAAgC,EAChC,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,MAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,gCAAgC,EAChC,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAA+C,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,kCAAkC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAC1D,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,MAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,kCAAkC,kBAAkB,CAAC,EAAE,CAAC,SAAS,EACjE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF;AA9DD,0DA8DC"}

View File

@@ -0,0 +1,452 @@
import { StripeResource } from '../../StripeResource.js';
import { Transaction } from './Transactions.js';
import { Mandate } from './../Mandates.js';
import { MetadataParam, Emptyable, AddressParam, PaginationParams, RangeQueryParam, Metadata, Address } from '../../shared.js';
import { RequestOptions, ApiListPromise, Response } from '../../lib.js';
export declare class OutboundPaymentResource extends StripeResource {
/**
* Returns a list of OutboundPayments sent from the specified FinancialAccount.
*/
list(params: Treasury.OutboundPaymentListParams, options?: RequestOptions): ApiListPromise<OutboundPayment>;
/**
* Creates an OutboundPayment.
*/
create(params: Treasury.OutboundPaymentCreateParams, options?: RequestOptions): Promise<Response<OutboundPayment>>;
/**
* Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.
*/
retrieve(id: string, params?: Treasury.OutboundPaymentRetrieveParams, options?: RequestOptions): Promise<Response<OutboundPayment>>;
/**
* Cancel an OutboundPayment.
*/
cancel(id: string, params?: Treasury.OutboundPaymentCancelParams, options?: RequestOptions): Promise<Response<OutboundPayment>>;
}
export interface OutboundPayment {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'treasury.outbound_payment';
/**
* Amount (in cents) transferred.
*/
amount: number;
/**
* Returns `true` if the object can be canceled, and `false` otherwise.
*/
cancelable: boolean;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* 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).
*/
currency: string;
/**
* ID of the [customer](https://docs.stripe.com/api/customers) to whom an OutboundPayment is sent.
*/
customer: string | null;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description: string | null;
/**
* The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`.
*/
destination_payment_method: string | null;
/**
* Details about the PaymentMethod for an OutboundPayment.
*/
destination_payment_method_details: Treasury.OutboundPayment.DestinationPaymentMethodDetails | null;
/**
* Details about the end user.
*/
end_user_details: Treasury.OutboundPayment.EndUserDetails | null;
/**
* The date when funds are expected to arrive in the destination account.
*/
expected_arrival_date: number;
/**
* The FinancialAccount that funds were pulled from.
*/
financial_account: string;
/**
* A [hosted transaction receipt](https://docs.stripe.com/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
*/
hosted_regulatory_receipt_url: string | null;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata: Metadata;
/**
* Details about a returned OutboundPayment. Only set when the status is `returned`.
*/
returned_details: Treasury.OutboundPayment.ReturnedDetails | null;
/**
* The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).
*/
statement_descriptor: string;
/**
* Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`.
*/
status: Treasury.OutboundPayment.Status;
status_transitions: Treasury.OutboundPayment.StatusTransitions;
/**
* Details about network-specific tracking information if available.
*/
tracking_details: Treasury.OutboundPayment.TrackingDetails | null;
/**
* The Transaction associated with this object.
*/
transaction: string | Transaction;
}
export declare namespace Treasury {
namespace OutboundPayment {
interface DestinationPaymentMethodDetails {
billing_details: DestinationPaymentMethodDetails.BillingDetails;
financial_account?: DestinationPaymentMethodDetails.FinancialAccount;
/**
* The type of the payment method used in the OutboundPayment.
*/
type: DestinationPaymentMethodDetails.Type;
us_bank_account?: DestinationPaymentMethodDetails.UsBankAccount;
}
interface EndUserDetails {
/**
* IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked.
*/
ip_address: string | null;
/**
* `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.
*/
present: boolean;
}
interface ReturnedDetails {
/**
* Reason for the return.
*/
code: ReturnedDetails.Code;
/**
* The Transaction associated with this object.
*/
transaction: string | Transaction;
}
type Status = 'canceled' | 'failed' | 'posted' | 'processing' | 'returned';
interface StatusTransitions {
/**
* Timestamp describing when an OutboundPayment changed status to `canceled`.
*/
canceled_at: number | null;
/**
* Timestamp describing when an OutboundPayment changed status to `failed`.
*/
failed_at: number | null;
/**
* Timestamp describing when an OutboundPayment changed status to `posted`.
*/
posted_at: number | null;
/**
* Timestamp describing when an OutboundPayment changed status to `returned`.
*/
returned_at: number | null;
}
interface TrackingDetails {
ach?: TrackingDetails.Ach;
/**
* The US bank account network used to send funds.
*/
type: TrackingDetails.Type;
us_domestic_wire?: TrackingDetails.UsDomesticWire;
}
namespace DestinationPaymentMethodDetails {
interface BillingDetails {
address: Address;
/**
* Email address.
*/
email: string | null;
/**
* Full name.
*/
name: string | null;
}
interface FinancialAccount {
/**
* Token of the FinancialAccount.
*/
id: string;
/**
* The rails used to send funds.
*/
network: 'stripe';
}
type Type = 'financial_account' | 'us_bank_account';
interface UsBankAccount {
/**
* Account holder type: individual or company.
*/
account_holder_type: UsBankAccount.AccountHolderType | null;
/**
* Account type: checkings or savings. Defaults to checking if omitted.
*/
account_type: UsBankAccount.AccountType | null;
/**
* Name of the bank associated with the bank account.
*/
bank_name: string | null;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* Last four digits of the bank account number.
*/
last4: string | null;
/**
* ID of the mandate used to make this payment.
*/
mandate?: string | Mandate;
/**
* The network rails used. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
*/
network: UsBankAccount.Network;
/**
* Routing number of the bank account.
*/
routing_number: string | null;
}
namespace UsBankAccount {
type AccountHolderType = 'company' | 'individual';
type AccountType = 'checking' | 'savings';
type Network = 'ach' | 'us_domestic_wire';
}
}
namespace ReturnedDetails {
type Code = 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'declined' | 'incorrect_account_holder_name' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other';
}
namespace TrackingDetails {
interface Ach {
/**
* ACH trace ID of the OutboundPayment for payments sent over the `ach` network.
*/
trace_id: string;
}
type Type = 'ach' | 'us_domestic_wire';
interface UsDomesticWire {
/**
* CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network.
*/
chips: string | null;
/**
* IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network.
*/
imad: string | null;
/**
* OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network.
*/
omad: string | null;
}
}
}
}
export declare namespace Treasury {
interface OutboundPaymentCreateParams {
/**
* Amount (in cents) to be transferred.
*/
amount: number;
/**
* 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).
*/
currency: string;
/**
* The FinancialAccount to pull funds from.
*/
financial_account: string;
/**
* ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in.
*/
customer?: string;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description?: string;
/**
* The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`.
*/
destination_payment_method?: string;
/**
* Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.
*/
destination_payment_method_data?: OutboundPaymentCreateParams.DestinationPaymentMethodData;
/**
* Payment method-specific configuration for this OutboundPayment.
*/
destination_payment_method_options?: OutboundPaymentCreateParams.DestinationPaymentMethodOptions;
/**
* End user details.
*/
end_user_details?: OutboundPaymentCreateParams.EndUserDetails;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Set of [key-value pairs](https://docs.stripe.com/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`.
*/
metadata?: MetadataParam;
/**
* The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. Can only include -#.$&*, spaces, and alphanumeric characters. The default value is "payment".
*/
statement_descriptor?: string;
}
namespace OutboundPaymentCreateParams {
interface DestinationPaymentMethodData {
/**
* Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
*/
billing_details?: DestinationPaymentMethodData.BillingDetails;
/**
* Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
*/
financial_account?: string;
/**
* Set of [key-value pairs](https://docs.stripe.com/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`.
*/
metadata?: MetadataParam;
/**
* The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
*/
type: DestinationPaymentMethodData.Type;
/**
* Required hash if type is set to `us_bank_account`.
*/
us_bank_account?: DestinationPaymentMethodData.UsBankAccount;
}
interface DestinationPaymentMethodOptions {
/**
* Optional fields for `us_bank_account`.
*/
us_bank_account?: Emptyable<DestinationPaymentMethodOptions.UsBankAccount>;
}
interface EndUserDetails {
/**
* IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`.
*/
ip_address?: string;
/**
* `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.
*/
present: boolean;
}
namespace DestinationPaymentMethodData {
interface BillingDetails {
/**
* Billing address.
*/
address?: Emptyable<AddressParam>;
/**
* Email address.
*/
email?: Emptyable<string>;
/**
* Full name.
*/
name?: Emptyable<string>;
/**
* Billing phone number (including extension).
*/
phone?: Emptyable<string>;
}
type Type = 'financial_account' | 'us_bank_account';
interface UsBankAccount {
/**
* Account holder type: individual or company.
*/
account_holder_type?: UsBankAccount.AccountHolderType;
/**
* Account number of the bank account.
*/
account_number?: string;
/**
* Account type: checkings or savings. Defaults to checking if omitted.
*/
account_type?: UsBankAccount.AccountType;
/**
* The ID of a Financial Connections Account to use as a payment method.
*/
financial_connections_account?: string;
/**
* Routing number of the bank account.
*/
routing_number?: string;
}
namespace UsBankAccount {
type AccountHolderType = 'company' | 'individual';
type AccountType = 'checking' | 'savings';
}
}
namespace DestinationPaymentMethodOptions {
interface UsBankAccount {
/**
* Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
*/
network?: UsBankAccount.Network;
}
namespace UsBankAccount {
type Network = 'ach' | 'us_domestic_wire';
}
}
}
}
export declare namespace Treasury {
interface OutboundPaymentRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace Treasury {
interface OutboundPaymentListParams extends PaginationParams {
/**
* Returns objects associated with this FinancialAccount.
*/
financial_account: string;
/**
* Only return OutboundPayments that were created during the given date interval.
*/
created?: RangeQueryParam | number;
/**
* Only return OutboundPayments sent to this customer.
*/
customer?: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`.
*/
status?: OutboundPaymentListParams.Status;
}
namespace OutboundPaymentListParams {
type Status = 'canceled' | 'failed' | 'posted' | 'processing' | 'returned';
}
}
export declare namespace Treasury {
interface OutboundPaymentCancelParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}

View File

@@ -0,0 +1,35 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.OutboundPaymentResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class OutboundPaymentResource extends StripeResource_js_1.StripeResource {
/**
* Returns a list of OutboundPayments sent from the specified FinancialAccount.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/treasury/outbound_payments', params, options, {
methodType: 'list',
});
}
/**
* Creates an OutboundPayment.
*/
create(params, options) {
return this._makeRequest('POST', '/v1/treasury/outbound_payments', params, options);
}
/**
* Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/treasury/outbound_payments/${encodeURIComponent(id)}`, params, options);
}
/**
* Cancel an OutboundPayment.
*/
cancel(id, params, options) {
return this._makeRequest('POST', `/v1/treasury/outbound_payments/${encodeURIComponent(id)}/cancel`, params, options);
}
}
exports.OutboundPaymentResource = OutboundPaymentResource;
//# sourceMappingURL=OutboundPayments.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"OutboundPayments.js","sourceRoot":"","sources":["../../../src/resources/Treasury/OutboundPayments.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAEvC,+DAAuD;AAcvD,MAAa,uBAAwB,SAAQ,kCAAc;IACzD;;OAEG;IACH,IAAI,CACF,MAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,gCAAgC,EAChC,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,MAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,gCAAgC,EAChC,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAA+C,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,kCAAkC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAC1D,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,MAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,kCAAkC,kBAAkB,CAAC,EAAE,CAAC,SAAS,EACjE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF;AA9DD,0DA8DC"}

View File

@@ -0,0 +1,346 @@
import { StripeResource } from '../../StripeResource.js';
import { Transaction } from './Transactions.js';
import { Mandate } from './../Mandates.js';
import { MetadataParam, Emptyable, PaginationParams, Metadata, Address } from '../../shared.js';
import { RequestOptions, ApiListPromise, Response } from '../../lib.js';
export declare class OutboundTransferResource extends StripeResource {
/**
* Returns a list of OutboundTransfers sent from the specified FinancialAccount.
*/
list(params: Treasury.OutboundTransferListParams, options?: RequestOptions): ApiListPromise<OutboundTransfer>;
/**
* Creates an OutboundTransfer.
*/
create(params: Treasury.OutboundTransferCreateParams, options?: RequestOptions): Promise<Response<OutboundTransfer>>;
/**
* Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.
*/
retrieve(id: string, params?: Treasury.OutboundTransferRetrieveParams, options?: RequestOptions): Promise<Response<OutboundTransfer>>;
/**
* An OutboundTransfer can be canceled if the funds have not yet been paid out.
*/
cancel(id: string, params?: Treasury.OutboundTransferCancelParams, options?: RequestOptions): Promise<Response<OutboundTransfer>>;
}
export interface OutboundTransfer {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'treasury.outbound_transfer';
/**
* Amount (in cents) transferred.
*/
amount: number;
/**
* Returns `true` if the object can be canceled, and `false` otherwise.
*/
cancelable: boolean;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* 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).
*/
currency: string;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description: string | null;
/**
* The PaymentMethod used as the payment instrument for an OutboundTransfer.
*/
destination_payment_method: string | null;
destination_payment_method_details: Treasury.OutboundTransfer.DestinationPaymentMethodDetails;
/**
* The date when funds are expected to arrive in the destination account.
*/
expected_arrival_date: number;
/**
* The FinancialAccount that funds were pulled from.
*/
financial_account: string;
/**
* A [hosted transaction receipt](https://docs.stripe.com/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
*/
hosted_regulatory_receipt_url: string | null;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata: Metadata;
/**
* Details about a returned OutboundTransfer. Only set when the status is `returned`.
*/
returned_details: Treasury.OutboundTransfer.ReturnedDetails | null;
/**
* Information about the OutboundTransfer to be sent to the recipient account.
*/
statement_descriptor: string;
/**
* Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`.
*/
status: Treasury.OutboundTransfer.Status;
status_transitions: Treasury.OutboundTransfer.StatusTransitions;
/**
* Details about network-specific tracking information if available.
*/
tracking_details: Treasury.OutboundTransfer.TrackingDetails | null;
/**
* The Transaction associated with this object.
*/
transaction: string | Transaction;
}
export declare namespace Treasury {
namespace OutboundTransfer {
interface DestinationPaymentMethodDetails {
billing_details: DestinationPaymentMethodDetails.BillingDetails;
financial_account?: DestinationPaymentMethodDetails.FinancialAccount;
/**
* The type of the payment method used in the OutboundTransfer.
*/
type: DestinationPaymentMethodDetails.Type;
us_bank_account?: DestinationPaymentMethodDetails.UsBankAccount;
}
interface ReturnedDetails {
/**
* Reason for the return.
*/
code: ReturnedDetails.Code;
/**
* The Transaction associated with this object.
*/
transaction: string | Transaction;
}
type Status = 'canceled' | 'failed' | 'posted' | 'processing' | 'returned';
interface StatusTransitions {
/**
* Timestamp describing when an OutboundTransfer changed status to `canceled`
*/
canceled_at: number | null;
/**
* Timestamp describing when an OutboundTransfer changed status to `failed`
*/
failed_at: number | null;
/**
* Timestamp describing when an OutboundTransfer changed status to `posted`
*/
posted_at: number | null;
/**
* Timestamp describing when an OutboundTransfer changed status to `returned`
*/
returned_at: number | null;
}
interface TrackingDetails {
ach?: TrackingDetails.Ach;
/**
* The US bank account network used to send funds.
*/
type: TrackingDetails.Type;
us_domestic_wire?: TrackingDetails.UsDomesticWire;
}
namespace DestinationPaymentMethodDetails {
interface BillingDetails {
address: Address;
/**
* Email address.
*/
email: string | null;
/**
* Full name.
*/
name: string | null;
}
interface FinancialAccount {
/**
* Token of the FinancialAccount.
*/
id: string;
/**
* The rails used to send funds.
*/
network: 'stripe';
}
type Type = 'financial_account' | 'us_bank_account';
interface UsBankAccount {
/**
* Account holder type: individual or company.
*/
account_holder_type: UsBankAccount.AccountHolderType | null;
/**
* Account type: checkings or savings. Defaults to checking if omitted.
*/
account_type: UsBankAccount.AccountType | null;
/**
* Name of the bank associated with the bank account.
*/
bank_name: string | null;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* Last four digits of the bank account number.
*/
last4: string | null;
/**
* ID of the mandate used to make this payment.
*/
mandate?: string | Mandate;
/**
* The network rails used. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
*/
network: UsBankAccount.Network;
/**
* Routing number of the bank account.
*/
routing_number: string | null;
}
namespace UsBankAccount {
type AccountHolderType = 'company' | 'individual';
type AccountType = 'checking' | 'savings';
type Network = 'ach' | 'us_domestic_wire';
}
}
namespace ReturnedDetails {
type Code = 'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'declined' | 'incorrect_account_holder_name' | 'invalid_account_number' | 'invalid_currency' | 'no_account' | 'other';
}
namespace TrackingDetails {
interface Ach {
/**
* ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network.
*/
trace_id: string;
}
type Type = 'ach' | 'us_domestic_wire';
interface UsDomesticWire {
/**
* CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.
*/
chips: string | null;
/**
* IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.
*/
imad: string | null;
/**
* OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.
*/
omad: string | null;
}
}
}
}
export declare namespace Treasury {
interface OutboundTransferCreateParams {
/**
* Amount (in cents) to be transferred.
*/
amount: number;
/**
* 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).
*/
currency: string;
/**
* The FinancialAccount to pull funds from.
*/
financial_account: string;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description?: string;
/**
* The PaymentMethod to use as the payment instrument for the OutboundTransfer.
*/
destination_payment_method?: string;
/**
* Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with `destination_payment_method`.
*/
destination_payment_method_data?: OutboundTransferCreateParams.DestinationPaymentMethodData;
/**
* Hash describing payment method configuration details.
*/
destination_payment_method_options?: OutboundTransferCreateParams.DestinationPaymentMethodOptions;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Set of [key-value pairs](https://docs.stripe.com/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`.
*/
metadata?: MetadataParam;
/**
* Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is "transfer". Can only include -#.$&*, spaces, and alphanumeric characters.
*/
statement_descriptor?: string;
}
namespace OutboundTransferCreateParams {
interface DestinationPaymentMethodData {
/**
* Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
*/
financial_account?: string;
/**
* The type of the destination.
*/
type: 'financial_account';
}
interface DestinationPaymentMethodOptions {
/**
* Optional fields for `us_bank_account`.
*/
us_bank_account?: Emptyable<DestinationPaymentMethodOptions.UsBankAccount>;
}
namespace DestinationPaymentMethodOptions {
interface UsBankAccount {
/**
* Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
*/
network?: UsBankAccount.Network;
}
namespace UsBankAccount {
type Network = 'ach' | 'us_domestic_wire';
}
}
}
}
export declare namespace Treasury {
interface OutboundTransferRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace Treasury {
interface OutboundTransferListParams extends PaginationParams {
/**
* Returns objects associated with this FinancialAccount.
*/
financial_account: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`.
*/
status?: OutboundTransferListParams.Status;
}
namespace OutboundTransferListParams {
type Status = 'canceled' | 'failed' | 'posted' | 'processing' | 'returned';
}
}
export declare namespace Treasury {
interface OutboundTransferCancelParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}

View File

@@ -0,0 +1,35 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.OutboundTransferResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class OutboundTransferResource extends StripeResource_js_1.StripeResource {
/**
* Returns a list of OutboundTransfers sent from the specified FinancialAccount.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/treasury/outbound_transfers', params, options, {
methodType: 'list',
});
}
/**
* Creates an OutboundTransfer.
*/
create(params, options) {
return this._makeRequest('POST', '/v1/treasury/outbound_transfers', params, options);
}
/**
* Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/treasury/outbound_transfers/${encodeURIComponent(id)}`, params, options);
}
/**
* An OutboundTransfer can be canceled if the funds have not yet been paid out.
*/
cancel(id, params, options) {
return this._makeRequest('POST', `/v1/treasury/outbound_transfers/${encodeURIComponent(id)}/cancel`, params, options);
}
}
exports.OutboundTransferResource = OutboundTransferResource;
//# sourceMappingURL=OutboundTransfers.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"OutboundTransfers.js","sourceRoot":"","sources":["../../../src/resources/Treasury/OutboundTransfers.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAEvC,+DAAuD;AAYvD,MAAa,wBAAyB,SAAQ,kCAAc;IAC1D;;OAEG;IACH,IAAI,CACF,MAA2C,EAC3C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,iCAAiC,EACjC,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,MAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,iCAAiC,EACjC,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAAgD,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,mCAAmC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAC3D,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,MAA8C,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,mCAAmC,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAClE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF;AA9DD,4DA8DC"}

View File

@@ -0,0 +1,261 @@
import { StripeResource } from '../../StripeResource.js';
import { Transaction } from './Transactions.js';
import { CreditReversal } from './CreditReversals.js';
import { OutboundPayment } from './OutboundPayments.js';
import { OutboundTransfer } from './OutboundTransfers.js';
import { Payout } from './../Payouts.js';
import { PaginationParams, Address } from '../../shared.js';
import { RequestOptions, ApiListPromise, Response } from '../../lib.js';
export declare class ReceivedCreditResource extends StripeResource {
/**
* Returns a list of ReceivedCredits.
*/
list(params: Treasury.ReceivedCreditListParams, options?: RequestOptions): ApiListPromise<ReceivedCredit>;
/**
* Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.
*/
retrieve(id: string, params?: Treasury.ReceivedCreditRetrieveParams, options?: RequestOptions): Promise<Response<ReceivedCredit>>;
}
export interface ReceivedCredit {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'treasury.received_credit';
/**
* Amount (in cents) transferred.
*/
amount: number;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* 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).
*/
currency: string;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description: string;
/**
* Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.
*/
failure_code: Treasury.ReceivedCredit.FailureCode | null;
/**
* The FinancialAccount that received the funds.
*/
financial_account: string | null;
/**
* A [hosted transaction receipt](https://docs.stripe.com/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
*/
hosted_regulatory_receipt_url: string | null;
initiating_payment_method_details: Treasury.ReceivedCredit.InitiatingPaymentMethodDetails;
linked_flows: Treasury.ReceivedCredit.LinkedFlows;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* The rails used to send the funds.
*/
network: Treasury.ReceivedCredit.Network;
/**
* Details describing when a ReceivedCredit may be reversed.
*/
reversal_details: Treasury.ReceivedCredit.ReversalDetails | null;
/**
* Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field.
*/
status: Treasury.ReceivedCredit.Status;
/**
* The Transaction associated with this object.
*/
transaction: string | Transaction | null;
}
export declare namespace Treasury {
namespace ReceivedCredit {
type FailureCode = 'account_closed' | 'account_frozen' | 'international_transaction' | 'other';
interface InitiatingPaymentMethodDetails {
/**
* Set when `type` is `balance`.
*/
balance?: 'payments';
billing_details: InitiatingPaymentMethodDetails.BillingDetails;
financial_account?: InitiatingPaymentMethodDetails.FinancialAccount;
/**
* Set when `type` is `issuing_card`. This is an [Issuing Card](https://api.stripe.com#issuing_cards) ID.
*/
issuing_card?: string;
/**
* Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.
*/
type: InitiatingPaymentMethodDetails.Type;
us_bank_account?: InitiatingPaymentMethodDetails.UsBankAccount;
}
interface LinkedFlows {
/**
* The CreditReversal created as a result of this ReceivedCredit being reversed.
*/
credit_reversal: string | null;
/**
* Set if the ReceivedCredit was created due to an [Issuing Authorization](https://api.stripe.com#issuing_authorizations) object.
*/
issuing_authorization: string | null;
/**
* Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://api.stripe.com#issuing_transactions) object.
*/
issuing_transaction: string | null;
/**
* ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals.
*/
source_flow: string | null;
/**
* The expandable object of the source flow.
*/
source_flow_details?: LinkedFlows.SourceFlowDetails | null;
/**
* The type of flow that originated the ReceivedCredit (for example, `outbound_payment`).
*/
source_flow_type: string | null;
}
type Network = 'ach' | 'card' | 'stripe' | 'us_domestic_wire';
interface ReversalDetails {
/**
* Time before which a ReceivedCredit can be reversed.
*/
deadline: number | null;
/**
* Set if a ReceivedCredit cannot be reversed.
*/
restricted_reason: ReversalDetails.RestrictedReason | null;
}
type Status = 'failed' | 'succeeded';
namespace InitiatingPaymentMethodDetails {
interface BillingDetails {
address: Address;
/**
* Email address.
*/
email: string | null;
/**
* Full name.
*/
name: string | null;
}
interface FinancialAccount {
/**
* The FinancialAccount ID.
*/
id: string;
/**
* The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.
*/
network: 'stripe';
}
type Type = 'balance' | 'financial_account' | 'issuing_card' | 'stripe' | 'us_bank_account';
interface UsBankAccount {
/**
* Bank name.
*/
bank_name: string | null;
/**
* The last four digits of the bank account number.
*/
last4: string | null;
/**
* The routing number for the bank account.
*/
routing_number: string | null;
}
}
namespace LinkedFlows {
interface SourceFlowDetails {
/**
* You can reverse some [ReceivedCredits](https://api.stripe.com#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
*/
credit_reversal?: CreditReversal;
/**
* Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://api.stripe.com#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://api.stripe.com#outbound_transfers).
*
* Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
*
* Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)
*/
outbound_payment?: OutboundPayment;
/**
* Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://api.stripe.com#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://api.stripe.com#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
*
* Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
*
* Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
*/
outbound_transfer?: OutboundTransfer;
/**
* A `Payout` object is created when you receive funds from Stripe, or when you
* initiate a payout to either a bank account or debit card of a [connected
* Stripe account](https://docs.stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,
* and list all payouts. Payouts are made on [varying
* schedules](https://docs.stripe.com/docs/connect/manage-payout-schedule), depending on your country and
* industry.
*
* Related guide: [Receiving payouts](https://docs.stripe.com/payouts)
*/
payout?: Payout;
/**
* The type of the source flow that originated the ReceivedCredit.
*/
type: SourceFlowDetails.Type;
}
namespace SourceFlowDetails {
type Type = 'credit_reversal' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'payout';
}
}
namespace ReversalDetails {
type RestrictedReason = 'already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted';
}
}
}
export declare namespace Treasury {
interface ReceivedCreditRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace Treasury {
interface ReceivedCreditListParams extends PaginationParams {
/**
* The FinancialAccount that received the funds.
*/
financial_account: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Only return ReceivedCredits described by the flow.
*/
linked_flows?: ReceivedCreditListParams.LinkedFlows;
/**
* Only return ReceivedCredits that have the given status: `succeeded` or `failed`.
*/
status?: ReceivedCreditListParams.Status;
}
namespace ReceivedCreditListParams {
interface LinkedFlows {
/**
* The source flow type.
*/
source_flow_type: LinkedFlows.SourceFlowType;
}
type Status = 'failed' | 'succeeded';
namespace LinkedFlows {
type SourceFlowType = 'credit_reversal' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'payout';
}
}
}

View File

@@ -0,0 +1,23 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReceivedCreditResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class ReceivedCreditResource extends StripeResource_js_1.StripeResource {
/**
* Returns a list of ReceivedCredits.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/treasury/received_credits', params, options, {
methodType: 'list',
});
}
/**
* Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/treasury/received_credits/${encodeURIComponent(id)}`, params, options);
}
}
exports.ReceivedCreditResource = ReceivedCreditResource;
//# sourceMappingURL=ReceivedCredits.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ReceivedCredits.js","sourceRoot":"","sources":["../../../src/resources/Treasury/ReceivedCredits.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAEvC,+DAAuD;AASvD,MAAa,sBAAuB,SAAQ,kCAAc;IACxD;;OAEG;IACH,IAAI,CACF,MAAyC,EACzC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,+BAA+B,EAC/B,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAA8C,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,iCAAiC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EACzD,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF;AAjCD,wDAiCC"}

View File

@@ -0,0 +1,202 @@
import { StripeResource } from '../../StripeResource.js';
import { Transaction } from './Transactions.js';
import { PaginationParams, Address } from '../../shared.js';
import { RequestOptions, ApiListPromise, Response } from '../../lib.js';
export declare class ReceivedDebitResource extends StripeResource {
/**
* Returns a list of ReceivedDebits.
*/
list(params: Treasury.ReceivedDebitListParams, options?: RequestOptions): ApiListPromise<ReceivedDebit>;
/**
* Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list
*/
retrieve(id: string, params?: Treasury.ReceivedDebitRetrieveParams, options?: RequestOptions): Promise<Response<ReceivedDebit>>;
}
export interface ReceivedDebit {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'treasury.received_debit';
/**
* Amount (in cents) transferred.
*/
amount: number;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* 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).
*/
currency: string;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description: string;
/**
* Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.
*/
failure_code: Treasury.ReceivedDebit.FailureCode | null;
/**
* The FinancialAccount that funds were pulled from.
*/
financial_account: string | null;
/**
* A [hosted transaction receipt](https://docs.stripe.com/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
*/
hosted_regulatory_receipt_url: string | null;
initiating_payment_method_details?: Treasury.ReceivedDebit.InitiatingPaymentMethodDetails;
linked_flows: Treasury.ReceivedDebit.LinkedFlows;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* The network used for the ReceivedDebit.
*/
network: Treasury.ReceivedDebit.Network;
/**
* Details describing when a ReceivedDebit might be reversed.
*/
reversal_details: Treasury.ReceivedDebit.ReversalDetails | null;
/**
* Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`.
*/
status: Treasury.ReceivedDebit.Status;
/**
* The Transaction associated with this object.
*/
transaction: string | Transaction | null;
}
export declare namespace Treasury {
namespace ReceivedDebit {
type FailureCode = 'account_closed' | 'account_frozen' | 'insufficient_funds' | 'international_transaction' | 'other';
interface InitiatingPaymentMethodDetails {
/**
* Set when `type` is `balance`.
*/
balance?: 'payments';
billing_details: InitiatingPaymentMethodDetails.BillingDetails;
financial_account?: InitiatingPaymentMethodDetails.FinancialAccount;
/**
* Set when `type` is `issuing_card`. This is an [Issuing Card](https://api.stripe.com#issuing_cards) ID.
*/
issuing_card?: string;
/**
* Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.
*/
type: InitiatingPaymentMethodDetails.Type;
us_bank_account?: InitiatingPaymentMethodDetails.UsBankAccount;
}
interface LinkedFlows {
/**
* The DebitReversal created as a result of this ReceivedDebit being reversed.
*/
debit_reversal: string | null;
/**
* Set if the ReceivedDebit is associated with an InboundTransfer's return of funds.
*/
inbound_transfer: string | null;
/**
* Set if the ReceivedDebit was created due to an [Issuing Authorization](https://api.stripe.com#issuing_authorizations) object.
*/
issuing_authorization: string | null;
/**
* Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://api.stripe.com#issuing_disputes) object.
*/
issuing_transaction: string | null;
/**
* Set if the ReceivedDebit was created due to a [Payout](https://api.stripe.com#payouts) object.
*/
payout: string | null;
/**
* Set if the ReceivedDebit was created due to a [Topup](https://api.stripe.com#topups) object.
*/
topup: string | null;
}
type Network = 'ach' | 'card' | 'stripe';
interface ReversalDetails {
/**
* Time before which a ReceivedDebit can be reversed.
*/
deadline: number | null;
/**
* Set if a ReceivedDebit can't be reversed.
*/
restricted_reason: ReversalDetails.RestrictedReason | null;
}
type Status = 'failed' | 'succeeded';
namespace InitiatingPaymentMethodDetails {
interface BillingDetails {
address: Address;
/**
* Email address.
*/
email: string | null;
/**
* Full name.
*/
name: string | null;
}
interface FinancialAccount {
/**
* The FinancialAccount ID.
*/
id: string;
/**
* The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.
*/
network: 'stripe';
}
type Type = 'balance' | 'financial_account' | 'issuing_card' | 'stripe' | 'us_bank_account';
interface UsBankAccount {
/**
* Bank name.
*/
bank_name: string | null;
/**
* The last four digits of the bank account number.
*/
last4: string | null;
/**
* The routing number for the bank account.
*/
routing_number: string | null;
}
}
namespace ReversalDetails {
type RestrictedReason = 'already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted';
}
}
}
export declare namespace Treasury {
interface ReceivedDebitRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace Treasury {
interface ReceivedDebitListParams extends PaginationParams {
/**
* The FinancialAccount that funds were pulled from.
*/
financial_account: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Only return ReceivedDebits that have the given status: `succeeded` or `failed`.
*/
status?: ReceivedDebitListParams.Status;
}
namespace ReceivedDebitListParams {
type Status = 'failed' | 'succeeded';
}
}

View File

@@ -0,0 +1,23 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReceivedDebitResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class ReceivedDebitResource extends StripeResource_js_1.StripeResource {
/**
* Returns a list of ReceivedDebits.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/treasury/received_debits', params, options, {
methodType: 'list',
});
}
/**
* Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/treasury/received_debits/${encodeURIComponent(id)}`, params, options);
}
}
exports.ReceivedDebitResource = ReceivedDebitResource;
//# sourceMappingURL=ReceivedDebits.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ReceivedDebits.js","sourceRoot":"","sources":["../../../src/resources/Treasury/ReceivedDebits.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAEvC,+DAAuD;AAKvD,MAAa,qBAAsB,SAAQ,kCAAc;IACvD;;OAEG;IACH,IAAI,CACF,MAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,8BAA8B,EAC9B,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,gCAAgC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EACxD,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF;AAjCD,sDAiCC"}

View File

@@ -0,0 +1,187 @@
import { StripeResource } from '../../StripeResource.js';
import { Transaction } from './Transactions.js';
import { CreditReversal } from './CreditReversals.js';
import { DebitReversal } from './DebitReversals.js';
import { InboundTransfer } from './InboundTransfers.js';
import { OutboundPayment } from './OutboundPayments.js';
import { OutboundTransfer } from './OutboundTransfers.js';
import { ReceivedCredit } from './ReceivedCredits.js';
import { ReceivedDebit } from './ReceivedDebits.js';
import * as Issuing from './../Issuing/index.js';
import { PaginationParams, RangeQueryParam } from '../../shared.js';
import { RequestOptions, ApiListPromise, Response } from '../../lib.js';
export declare class TransactionEntryResource extends StripeResource {
/**
* Retrieves a list of TransactionEntry objects.
*/
list(params: Treasury.TransactionEntryListParams, options?: RequestOptions): ApiListPromise<TransactionEntry>;
/**
* Retrieves a TransactionEntry object.
*/
retrieve(id: string, params?: Treasury.TransactionEntryRetrieveParams, options?: RequestOptions): Promise<Response<TransactionEntry>>;
}
export interface TransactionEntry {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'treasury.transaction_entry';
/**
* Change to a FinancialAccount's balance
*/
balance_impact: Treasury.TransactionEntry.BalanceImpact;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* 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).
*/
currency: string;
/**
* When the TransactionEntry will impact the FinancialAccount's balance.
*/
effective_at: number;
/**
* The FinancialAccount associated with this object.
*/
financial_account: string;
/**
* Token of the flow associated with the TransactionEntry.
*/
flow: string | null;
/**
* Details of the flow associated with the TransactionEntry.
*/
flow_details?: Treasury.TransactionEntry.FlowDetails | null;
/**
* Type of the flow associated with the TransactionEntry.
*/
flow_type: Treasury.TransactionEntry.FlowType;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* The Transaction associated with this object.
*/
transaction: string | Transaction;
/**
* The specific money movement that generated the TransactionEntry.
*/
type: Treasury.TransactionEntry.Type;
}
export declare namespace Treasury {
namespace TransactionEntry {
interface BalanceImpact {
/**
* The change made to funds the user can spend right now.
*/
cash: number;
/**
* The change made to funds that are not spendable yet, but will become available at a later time.
*/
inbound_pending: number;
/**
* The change made to funds in the account, but not spendable because they are being held for pending outbound flows.
*/
outbound_pending: number;
}
interface FlowDetails {
/**
* You can reverse some [ReceivedCredits](https://api.stripe.com#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
*/
credit_reversal?: CreditReversal;
/**
* You can reverse some [ReceivedDebits](https://api.stripe.com#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
*/
debit_reversal?: DebitReversal;
/**
* Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://api.stripe.com#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
*
* Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)
*/
inbound_transfer?: InboundTransfer;
/**
* When an [issued card](https://docs.stripe.com/issuing) is used to make a purchase, an Issuing `Authorization`
* object is created. [Authorizations](https://docs.stripe.com/issuing/purchases/authorizations) must be approved for the
* purchase to be completed successfully.
*
* Related guide: [Issued card authorizations](https://docs.stripe.com/issuing/purchases/authorizations)
*/
issuing_authorization?: Issuing.Authorization;
/**
* Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://api.stripe.com#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://api.stripe.com#outbound_transfers).
*
* Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
*
* Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)
*/
outbound_payment?: OutboundPayment;
/**
* Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://api.stripe.com#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://api.stripe.com#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
*
* Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
*
* Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
*/
outbound_transfer?: OutboundTransfer;
/**
* ReceivedCredits represent funds sent to a [FinancialAccount](https://api.stripe.com#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
*/
received_credit?: ReceivedCredit;
/**
* ReceivedDebits represent funds pulled from a [FinancialAccount](https://api.stripe.com#financial_accounts). These are not initiated from the FinancialAccount.
*/
received_debit?: ReceivedDebit;
/**
* Type of the flow that created the Transaction. Set to the same value as `flow_type`.
*/
type: FlowDetails.Type;
}
type FlowType = 'credit_reversal' | 'debit_reversal' | 'inbound_transfer' | 'issuing_authorization' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'received_credit' | 'received_debit';
type Type = 'credit_reversal' | 'credit_reversal_posting' | 'debit_reversal' | 'inbound_transfer' | 'inbound_transfer_return' | 'issuing_authorization_hold' | 'issuing_authorization_release' | 'other' | 'outbound_payment' | 'outbound_payment_cancellation' | 'outbound_payment_failure' | 'outbound_payment_posting' | 'outbound_payment_return' | 'outbound_transfer' | 'outbound_transfer_cancellation' | 'outbound_transfer_failure' | 'outbound_transfer_posting' | 'outbound_transfer_return' | 'received_credit' | 'received_debit';
namespace FlowDetails {
type Type = 'credit_reversal' | 'debit_reversal' | 'inbound_transfer' | 'issuing_authorization' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'received_credit' | 'received_debit';
}
}
}
export declare namespace Treasury {
interface TransactionEntryRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace Treasury {
interface TransactionEntryListParams extends PaginationParams {
/**
* Returns objects associated with this FinancialAccount.
*/
financial_account: string;
/**
* Only return TransactionEntries that were created during the given date interval.
*/
created?: RangeQueryParam | number;
effective_at?: RangeQueryParam | number;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* The results are in reverse chronological order by `created` or `effective_at`. The default is `created`.
*/
order_by?: TransactionEntryListParams.OrderBy;
/**
* Only return TransactionEntries associated with this Transaction.
*/
transaction?: string;
}
namespace TransactionEntryListParams {
type OrderBy = 'created' | 'effective_at';
}
}

View File

@@ -0,0 +1,402 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.TransactionEntryResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class TransactionEntryResource extends StripeResource_js_1.StripeResource {
/**
* Retrieves a list of TransactionEntry objects.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/treasury/transaction_entries', params, options, {
methodType: 'list',
responseSchema: {
kind: 'object',
fields: {
data: {
kind: 'array',
element: {
kind: 'object',
fields: {
flow_details: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
issuing_authorization: {
kind: 'object',
fields: {
fleet: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
reported_breakdown: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
non_fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
tax: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
local_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
national_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
},
},
},
},
},
},
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
quantity_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
unit_cost_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
transactions: {
kind: 'array',
element: {
kind: 'object',
fields: {
purchase_details: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fleet: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
reported_breakdown: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
non_fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
tax: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
local_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
national_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
},
},
},
},
},
},
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
quantity_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
unit_cost_decimal: {
kind: 'decimal_string',
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
});
}
/**
* Retrieves a TransactionEntry object.
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/treasury/transaction_entries/${encodeURIComponent(id)}`, params, options, {
responseSchema: {
kind: 'object',
fields: {
flow_details: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
issuing_authorization: {
kind: 'object',
fields: {
fleet: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
reported_breakdown: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
non_fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
tax: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
local_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
national_amount_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
},
},
},
},
},
},
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
quantity_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
unit_cost_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
transactions: {
kind: 'array',
element: {
kind: 'object',
fields: {
purchase_details: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fleet: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
reported_breakdown: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
non_fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
tax: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
local_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
national_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
},
},
},
},
},
},
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
quantity_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
unit_cost_decimal: {
kind: 'decimal_string',
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
});
}
}
exports.TransactionEntryResource = TransactionEntryResource;
//# sourceMappingURL=TransactionEntries.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,212 @@
import { StripeResource } from '../../StripeResource.js';
import { TransactionEntry } from './TransactionEntries.js';
import { CreditReversal } from './CreditReversals.js';
import { DebitReversal } from './DebitReversals.js';
import { InboundTransfer } from './InboundTransfers.js';
import { OutboundPayment } from './OutboundPayments.js';
import { OutboundTransfer } from './OutboundTransfers.js';
import { ReceivedCredit } from './ReceivedCredits.js';
import { ReceivedDebit } from './ReceivedDebits.js';
import * as Issuing from './../Issuing/index.js';
import { PaginationParams, RangeQueryParam } from '../../shared.js';
import { RequestOptions, ApiListPromise, Response, ApiList } from '../../lib.js';
export declare class TransactionResource extends StripeResource {
/**
* Retrieves a list of Transaction objects.
*/
list(params: Treasury.TransactionListParams, options?: RequestOptions): ApiListPromise<Transaction>;
/**
* Retrieves the details of an existing Transaction.
*/
retrieve(id: string, params?: Treasury.TransactionRetrieveParams, options?: RequestOptions): Promise<Response<Transaction>>;
}
export interface Transaction {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'treasury.transaction';
/**
* Amount (in cents) transferred.
*/
amount: number;
/**
* Change to a FinancialAccount's balance
*/
balance_impact: Treasury.Transaction.BalanceImpact;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* 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).
*/
currency: string;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description: string;
/**
* A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.
*/
entries?: ApiList<TransactionEntry> | null;
/**
* The FinancialAccount associated with this object.
*/
financial_account: string;
/**
* ID of the flow that created the Transaction.
*/
flow: string | null;
/**
* Details of the flow that created the Transaction.
*/
flow_details?: Treasury.Transaction.FlowDetails | null;
/**
* Type of the flow that created the Transaction.
*/
flow_type: Treasury.Transaction.FlowType;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* Status of the Transaction.
*/
status: Treasury.Transaction.Status;
status_transitions: Treasury.Transaction.StatusTransitions;
}
export declare namespace Treasury {
namespace Transaction {
interface BalanceImpact {
/**
* The change made to funds the user can spend right now.
*/
cash: number;
/**
* The change made to funds that are not spendable yet, but will become available at a later time.
*/
inbound_pending: number;
/**
* The change made to funds in the account, but not spendable because they are being held for pending outbound flows.
*/
outbound_pending: number;
}
interface FlowDetails {
/**
* You can reverse some [ReceivedCredits](https://api.stripe.com#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
*/
credit_reversal?: CreditReversal;
/**
* You can reverse some [ReceivedDebits](https://api.stripe.com#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
*/
debit_reversal?: DebitReversal;
/**
* Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://api.stripe.com#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
*
* Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)
*/
inbound_transfer?: InboundTransfer;
/**
* When an [issued card](https://docs.stripe.com/issuing) is used to make a purchase, an Issuing `Authorization`
* object is created. [Authorizations](https://docs.stripe.com/issuing/purchases/authorizations) must be approved for the
* purchase to be completed successfully.
*
* Related guide: [Issued card authorizations](https://docs.stripe.com/issuing/purchases/authorizations)
*/
issuing_authorization?: Issuing.Authorization;
/**
* Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://api.stripe.com#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://api.stripe.com#outbound_transfers).
*
* Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
*
* Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)
*/
outbound_payment?: OutboundPayment;
/**
* Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://api.stripe.com#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://api.stripe.com#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
*
* Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
*
* Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
*/
outbound_transfer?: OutboundTransfer;
/**
* ReceivedCredits represent funds sent to a [FinancialAccount](https://api.stripe.com#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
*/
received_credit?: ReceivedCredit;
/**
* ReceivedDebits represent funds pulled from a [FinancialAccount](https://api.stripe.com#financial_accounts). These are not initiated from the FinancialAccount.
*/
received_debit?: ReceivedDebit;
/**
* Type of the flow that created the Transaction. Set to the same value as `flow_type`.
*/
type: FlowDetails.Type;
}
type FlowType = 'credit_reversal' | 'debit_reversal' | 'inbound_transfer' | 'issuing_authorization' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'received_credit' | 'received_debit';
type Status = 'open' | 'posted' | 'void';
interface StatusTransitions {
/**
* Timestamp describing when the Transaction changed status to `posted`.
*/
posted_at: number | null;
/**
* Timestamp describing when the Transaction changed status to `void`.
*/
void_at: number | null;
}
namespace FlowDetails {
type Type = 'credit_reversal' | 'debit_reversal' | 'inbound_transfer' | 'issuing_authorization' | 'other' | 'outbound_payment' | 'outbound_transfer' | 'received_credit' | 'received_debit';
}
}
}
export declare namespace Treasury {
interface TransactionRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace Treasury {
interface TransactionListParams extends PaginationParams {
/**
* Returns objects associated with this FinancialAccount.
*/
financial_account: string;
/**
* Only return Transactions that were created during the given date interval.
*/
created?: RangeQueryParam | number;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* The results are in reverse chronological order by `created` or `posted_at`. The default is `created`.
*/
order_by?: TransactionListParams.OrderBy;
/**
* Only return Transactions that have the given status: `open`, `posted`, or `void`.
*/
status?: TransactionListParams.Status;
/**
* A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified.
*/
status_transitions?: TransactionListParams.StatusTransitions;
}
namespace TransactionListParams {
type OrderBy = 'created' | 'posted_at';
type Status = 'open' | 'posted' | 'void';
interface StatusTransitions {
/**
* Returns Transactions with `posted_at` within the specified range.
*/
posted_at?: RangeQueryParam | number;
}
}
}

View File

@@ -0,0 +1,454 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.TransactionResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class TransactionResource extends StripeResource_js_1.StripeResource {
/**
* Retrieves a list of Transaction objects.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/treasury/transactions', params, options, {
methodType: 'list',
responseSchema: {
kind: 'object',
fields: {
data: {
kind: 'array',
element: {
kind: 'object',
fields: {
entries: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
data: {
kind: 'array',
element: {
kind: 'object',
fields: {
flow_details: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
issuing_authorization: {
kind: 'object',
fields: {
fleet: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
reported_breakdown: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
non_fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
tax: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
local_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
national_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
},
},
},
},
},
},
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
quantity_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
unit_cost_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
transactions: {
kind: 'array',
element: {
kind: 'object',
fields: {
purchase_details: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fleet: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
reported_breakdown: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
non_fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
tax: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
local_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
national_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
},
},
},
},
},
},
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
quantity_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
unit_cost_decimal: {
kind: 'decimal_string',
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
});
}
/**
* Retrieves the details of an existing Transaction.
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/treasury/transactions/${encodeURIComponent(id)}`, params, options, {
responseSchema: {
kind: 'object',
fields: {
entries: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
data: {
kind: 'array',
element: {
kind: 'object',
fields: {
flow_details: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
issuing_authorization: {
kind: 'object',
fields: {
fleet: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
reported_breakdown: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
non_fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
tax: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
local_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
national_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
},
},
},
},
},
},
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
quantity_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
unit_cost_decimal: {
kind: 'nullable',
inner: { kind: 'decimal_string' },
},
},
},
},
transactions: {
kind: 'array',
element: {
kind: 'object',
fields: {
purchase_details: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fleet: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
reported_breakdown: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
non_fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
gross_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
tax: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
local_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
national_amount_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
},
},
},
},
},
},
},
},
},
fuel: {
kind: 'nullable',
inner: {
kind: 'object',
fields: {
quantity_decimal: {
kind: 'nullable',
inner: {
kind: 'decimal_string',
},
},
unit_cost_decimal: {
kind: 'decimal_string',
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
},
});
}
}
exports.TransactionResource = TransactionResource;
//# sourceMappingURL=Transactions.js.map

File diff suppressed because one or more lines are too long

83
node_modules/stripe/cjs/resources/Treasury/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,83 @@
import { Stripe } from '../../stripe.core.js';
import { Treasury as TreasuryNamespace0, CreditReversal, CreditReversalResource } from './CreditReversals.js';
import { Treasury as TreasuryNamespace1, DebitReversal, DebitReversalResource } from './DebitReversals.js';
import { Treasury as TreasuryNamespace2, FinancialAccount, FinancialAccountResource } from './FinancialAccounts.js';
import { Treasury as TreasuryNamespace3, InboundTransfer, InboundTransferResource } from './InboundTransfers.js';
import { Treasury as TreasuryNamespace4, OutboundPayment, OutboundPaymentResource } from './OutboundPayments.js';
import { Treasury as TreasuryNamespace5, OutboundTransfer, OutboundTransferResource } from './OutboundTransfers.js';
import { Treasury as TreasuryNamespace6, ReceivedCredit, ReceivedCreditResource } from './ReceivedCredits.js';
import { Treasury as TreasuryNamespace7, ReceivedDebit, ReceivedDebitResource } from './ReceivedDebits.js';
import { Treasury as TreasuryNamespace8, Transaction, TransactionResource } from './Transactions.js';
import { Treasury as TreasuryNamespace9, TransactionEntry, TransactionEntryResource } from './TransactionEntries.js';
import { FinancialAccountFeatures } from './FinancialAccountFeatures.js';
export { CreditReversal } from './CreditReversals.js';
export { DebitReversal } from './DebitReversals.js';
export { FinancialAccount } from './FinancialAccounts.js';
export { InboundTransfer } from './InboundTransfers.js';
export { OutboundPayment } from './OutboundPayments.js';
export { OutboundTransfer } from './OutboundTransfers.js';
export { ReceivedCredit } from './ReceivedCredits.js';
export { ReceivedDebit } from './ReceivedDebits.js';
export { Transaction } from './Transactions.js';
export { TransactionEntry } from './TransactionEntries.js';
export { FinancialAccountFeatures } from './FinancialAccountFeatures.js';
export declare class Treasury {
private readonly stripe;
creditReversals: CreditReversalResource;
debitReversals: DebitReversalResource;
financialAccounts: FinancialAccountResource;
inboundTransfers: InboundTransferResource;
outboundPayments: OutboundPaymentResource;
outboundTransfers: OutboundTransferResource;
receivedCredits: ReceivedCreditResource;
receivedDebits: ReceivedDebitResource;
transactions: TransactionResource;
transactionEntries: TransactionEntryResource;
constructor(stripe: Stripe);
}
export declare namespace Treasury {
export import CreditReversalListParams = TreasuryNamespace0.CreditReversalListParams;
export import CreditReversalCreateParams = TreasuryNamespace0.CreditReversalCreateParams;
export import CreditReversalRetrieveParams = TreasuryNamespace0.CreditReversalRetrieveParams;
export { CreditReversal };
export import DebitReversalListParams = TreasuryNamespace1.DebitReversalListParams;
export import DebitReversalCreateParams = TreasuryNamespace1.DebitReversalCreateParams;
export import DebitReversalRetrieveParams = TreasuryNamespace1.DebitReversalRetrieveParams;
export { DebitReversal };
export import FinancialAccountListParams = TreasuryNamespace2.FinancialAccountListParams;
export import FinancialAccountCreateParams = TreasuryNamespace2.FinancialAccountCreateParams;
export import FinancialAccountRetrieveParams = TreasuryNamespace2.FinancialAccountRetrieveParams;
export import FinancialAccountUpdateParams = TreasuryNamespace2.FinancialAccountUpdateParams;
export import FinancialAccountCloseParams = TreasuryNamespace2.FinancialAccountCloseParams;
export import FinancialAccountUpdateFeaturesParams = TreasuryNamespace2.FinancialAccountUpdateFeaturesParams;
export import FinancialAccountRetrieveFeaturesParams = TreasuryNamespace2.FinancialAccountRetrieveFeaturesParams;
export { FinancialAccount };
export import InboundTransferListParams = TreasuryNamespace3.InboundTransferListParams;
export import InboundTransferCreateParams = TreasuryNamespace3.InboundTransferCreateParams;
export import InboundTransferRetrieveParams = TreasuryNamespace3.InboundTransferRetrieveParams;
export import InboundTransferCancelParams = TreasuryNamespace3.InboundTransferCancelParams;
export { InboundTransfer };
export import OutboundPaymentListParams = TreasuryNamespace4.OutboundPaymentListParams;
export import OutboundPaymentCreateParams = TreasuryNamespace4.OutboundPaymentCreateParams;
export import OutboundPaymentRetrieveParams = TreasuryNamespace4.OutboundPaymentRetrieveParams;
export import OutboundPaymentCancelParams = TreasuryNamespace4.OutboundPaymentCancelParams;
export { OutboundPayment };
export import OutboundTransferListParams = TreasuryNamespace5.OutboundTransferListParams;
export import OutboundTransferCreateParams = TreasuryNamespace5.OutboundTransferCreateParams;
export import OutboundTransferRetrieveParams = TreasuryNamespace5.OutboundTransferRetrieveParams;
export import OutboundTransferCancelParams = TreasuryNamespace5.OutboundTransferCancelParams;
export { OutboundTransfer };
export import ReceivedCreditListParams = TreasuryNamespace6.ReceivedCreditListParams;
export import ReceivedCreditRetrieveParams = TreasuryNamespace6.ReceivedCreditRetrieveParams;
export { ReceivedCredit };
export import ReceivedDebitListParams = TreasuryNamespace7.ReceivedDebitListParams;
export import ReceivedDebitRetrieveParams = TreasuryNamespace7.ReceivedDebitRetrieveParams;
export { ReceivedDebit };
export import TransactionListParams = TreasuryNamespace8.TransactionListParams;
export import TransactionRetrieveParams = TreasuryNamespace8.TransactionRetrieveParams;
export { Transaction };
export import TransactionEntryListParams = TreasuryNamespace9.TransactionEntryListParams;
export import TransactionEntryRetrieveParams = TreasuryNamespace9.TransactionEntryRetrieveParams;
export { TransactionEntry };
export { FinancialAccountFeatures };
}

31
node_modules/stripe/cjs/resources/Treasury/index.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.Treasury = void 0;
const CreditReversals_js_1 = require("./CreditReversals.js");
const DebitReversals_js_1 = require("./DebitReversals.js");
const FinancialAccounts_js_1 = require("./FinancialAccounts.js");
const InboundTransfers_js_1 = require("./InboundTransfers.js");
const OutboundPayments_js_1 = require("./OutboundPayments.js");
const OutboundTransfers_js_1 = require("./OutboundTransfers.js");
const ReceivedCredits_js_1 = require("./ReceivedCredits.js");
const ReceivedDebits_js_1 = require("./ReceivedDebits.js");
const Transactions_js_1 = require("./Transactions.js");
const TransactionEntries_js_1 = require("./TransactionEntries.js");
class Treasury {
constructor(stripe) {
this.stripe = stripe;
this.creditReversals = new CreditReversals_js_1.CreditReversalResource(stripe);
this.debitReversals = new DebitReversals_js_1.DebitReversalResource(stripe);
this.financialAccounts = new FinancialAccounts_js_1.FinancialAccountResource(stripe);
this.inboundTransfers = new InboundTransfers_js_1.InboundTransferResource(stripe);
this.outboundPayments = new OutboundPayments_js_1.OutboundPaymentResource(stripe);
this.outboundTransfers = new OutboundTransfers_js_1.OutboundTransferResource(stripe);
this.receivedCredits = new ReceivedCredits_js_1.ReceivedCreditResource(stripe);
this.receivedDebits = new ReceivedDebits_js_1.ReceivedDebitResource(stripe);
this.transactions = new Transactions_js_1.TransactionResource(stripe);
this.transactionEntries = new TransactionEntries_js_1.TransactionEntryResource(stripe);
}
}
exports.Treasury = Treasury;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/Treasury/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAGvC,6DAI8B;AAC9B,2DAI6B;AAC7B,iEAIgC;AAChC,+DAI+B;AAC/B,+DAI+B;AAC/B,iEAIgC;AAChC,6DAI8B;AAC9B,2DAI6B;AAC7B,uDAI2B;AAC3B,mEAIiC;AAejC,MAAa,QAAQ;IAYnB,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,eAAe,GAAG,IAAI,2CAAsB,CAAC,MAAM,CAAC,CAAC;QAC1D,IAAI,CAAC,cAAc,GAAG,IAAI,yCAAqB,CAAC,MAAM,CAAC,CAAC;QACxD,IAAI,CAAC,iBAAiB,GAAG,IAAI,+CAAwB,CAAC,MAAM,CAAC,CAAC;QAC9D,IAAI,CAAC,gBAAgB,GAAG,IAAI,6CAAuB,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,gBAAgB,GAAG,IAAI,6CAAuB,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,iBAAiB,GAAG,IAAI,+CAAwB,CAAC,MAAM,CAAC,CAAC;QAC9D,IAAI,CAAC,eAAe,GAAG,IAAI,2CAAsB,CAAC,MAAM,CAAC,CAAC;QAC1D,IAAI,CAAC,cAAc,GAAG,IAAI,yCAAqB,CAAC,MAAM,CAAC,CAAC;QACxD,IAAI,CAAC,YAAY,GAAG,IAAI,qCAAmB,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,kBAAkB,GAAG,IAAI,gDAAwB,CAAC,MAAM,CAAC,CAAC;IACjE,CAAC;CACF;AAxBD,4BAwBC"}