Skip to content

Commit

Permalink
Add last response
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe committed Aug 20, 2020
1 parent 05ee391 commit df22a30
Show file tree
Hide file tree
Showing 61 changed files with 545 additions and 361 deletions.
2 changes: 1 addition & 1 deletion types/2020-03-02/AccountLinks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ declare module 'stripe' {
create(
params: AccountLinkCreateParams,
options?: RequestOptions
): Promise<Stripe.AccountLink>;
): Promise<Stripe.Response<Stripe.AccountLink>>;
}
}
}
74 changes: 44 additions & 30 deletions types/2020-03-02/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ declare module 'stripe' {
capabilities?: AccountCreateParams.Capabilities;

/**
* Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`.
* Information about the company or business. This field is available for any `business_type`.
*/
company?: AccountCreateParams.Company;

Expand Down Expand Up @@ -1557,7 +1557,7 @@ declare module 'stripe' {
capabilities?: AccountUpdateParams.Capabilities;

/**
* Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`.
* Information about the company or business. This field is available for any `business_type`.
*/
company?: AccountUpdateParams.Company;

Expand Down Expand Up @@ -2370,17 +2370,21 @@ declare module 'stripe' {
create(
params?: AccountCreateParams,
options?: RequestOptions
): Promise<Stripe.Account>;
create(options?: RequestOptions): Promise<Stripe.Account>;
): Promise<Stripe.Response<Stripe.Account>>;
create(
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Account>>;

/**
* Retrieves the details of an account.
*/
retrieve(
params?: AccountRetrieveParams,
options?: RequestOptions
): Promise<Stripe.Account>;
retrieve(options?: RequestOptions): Promise<Stripe.Account>;
): Promise<Stripe.Response<Stripe.Account>>;
retrieve(
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Account>>;

/**
* Retrieves the details of an account.
Expand All @@ -2389,8 +2393,11 @@ declare module 'stripe' {
id: string,
params?: AccountRetrieveParams,
options?: RequestOptions
): Promise<Stripe.Account>;
retrieve(id: string, options?: RequestOptions): Promise<Stripe.Account>;
): Promise<Stripe.Response<Stripe.Account>>;
retrieve(
id: string,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Account>>;

/**
* Updates a connected [Express or Custom account](https://stripe.com/docs/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are supported by both account types.
Expand All @@ -2401,7 +2408,7 @@ declare module 'stripe' {
id: string,
params?: AccountUpdateParams,
options?: RequestOptions
): Promise<Stripe.Account>;
): Promise<Stripe.Response<Stripe.Account>>;

/**
* Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty.
Expand All @@ -2423,8 +2430,11 @@ declare module 'stripe' {
id: string,
params?: AccountDeleteParams,
options?: RequestOptions
): Promise<Stripe.DeletedAccount>;
del(id: string, options?: RequestOptions): Promise<Stripe.DeletedAccount>;
): Promise<Stripe.Response<Stripe.DeletedAccount>>;
del(
id: string,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.DeletedAccount>>;

/**
* With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
Expand All @@ -2435,7 +2445,7 @@ declare module 'stripe' {
id: string,
params: AccountRejectParams,
options?: RequestOptions
): Promise<Stripe.Account>;
): Promise<Stripe.Response<Stripe.Account>>;

/**
* Retrieves information about the specified Account Capability.
Expand All @@ -2445,12 +2455,12 @@ declare module 'stripe' {
id: string,
params?: CapabilityRetrieveParams,
options?: RequestOptions
): Promise<Stripe.Capability>;
): Promise<Stripe.Response<Stripe.Capability>>;
retrieveCapability(
accountId: string,
id: string,
options?: RequestOptions
): Promise<Stripe.Capability>;
): Promise<Stripe.Response<Stripe.Capability>>;

/**
* Updates an existing Account Capability.
Expand All @@ -2460,7 +2470,7 @@ declare module 'stripe' {
id: string,
params?: CapabilityUpdateParams,
options?: RequestOptions
): Promise<Stripe.Capability>;
): Promise<Stripe.Response<Stripe.Capability>>;

/**
* Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.
Expand All @@ -2482,7 +2492,7 @@ declare module 'stripe' {
id: string,
params: ExternalAccountCreateParams,
options?: RequestOptions
): Promise<Stripe.BankAccount | Stripe.Card>;
): Promise<Stripe.Response<Stripe.BankAccount | Stripe.Card>>;

/**
* Retrieve a specified external account for a given account.
Expand All @@ -2492,12 +2502,12 @@ declare module 'stripe' {
id: string,
params?: ExternalAccountRetrieveParams,
options?: RequestOptions
): Promise<Stripe.BankAccount | Stripe.Card>;
): Promise<Stripe.Response<Stripe.BankAccount | Stripe.Card>>;
retrieveExternalAccount(
accountId: string,
id: string,
options?: RequestOptions
): Promise<Stripe.BankAccount | Stripe.Card>;
): Promise<Stripe.Response<Stripe.BankAccount | Stripe.Card>>;

/**
* Updates the metadata, account holder name, and account holder type of a bank account belonging to a [Custom account](https://stripe.com/docs/connect/custom-accounts), and optionally sets it as the default for its currency. Other bank account details are not editable by design.
Expand All @@ -2509,7 +2519,7 @@ declare module 'stripe' {
id: string,
params?: ExternalAccountUpdateParams,
options?: RequestOptions
): Promise<Stripe.BankAccount | Stripe.Card>;
): Promise<Stripe.Response<Stripe.BankAccount | Stripe.Card>>;

/**
* List external accounts for an account.
Expand All @@ -2532,12 +2542,16 @@ declare module 'stripe' {
id: string,
params?: ExternalAccountDeleteParams,
options?: RequestOptions
): Promise<Stripe.DeletedBankAccount | Stripe.DeletedCard>;
): Promise<
Stripe.Response<Stripe.DeletedBankAccount | Stripe.DeletedCard>
>;
deleteExternalAccount(
accountId: string,
id: string,
options?: RequestOptions
): Promise<Stripe.DeletedBankAccount | Stripe.DeletedCard>;
): Promise<
Stripe.Response<Stripe.DeletedBankAccount | Stripe.DeletedCard>
>;

/**
* Creates a single-use login link for an Express account to access their Stripe dashboard.
Expand All @@ -2548,11 +2562,11 @@ declare module 'stripe' {
id: string,
params?: LoginLinkCreateParams,
options?: RequestOptions
): Promise<Stripe.LoginLink>;
): Promise<Stripe.Response<Stripe.LoginLink>>;
createLoginLink(
id: string,
options?: RequestOptions
): Promise<Stripe.LoginLink>;
): Promise<Stripe.Response<Stripe.LoginLink>>;

/**
* Creates a new person.
Expand All @@ -2561,11 +2575,11 @@ declare module 'stripe' {
id: string,
params?: PersonCreateParams,
options?: RequestOptions
): Promise<Stripe.Person>;
): Promise<Stripe.Response<Stripe.Person>>;
createPerson(
id: string,
options?: RequestOptions
): Promise<Stripe.Person>;
): Promise<Stripe.Response<Stripe.Person>>;

/**
* Retrieves an existing person.
Expand All @@ -2575,12 +2589,12 @@ declare module 'stripe' {
id: string,
params?: PersonRetrieveParams,
options?: RequestOptions
): Promise<Stripe.Person>;
): Promise<Stripe.Response<Stripe.Person>>;
retrievePerson(
accountId: string,
id: string,
options?: RequestOptions
): Promise<Stripe.Person>;
): Promise<Stripe.Response<Stripe.Person>>;

/**
* Updates an existing person.
Expand All @@ -2590,7 +2604,7 @@ declare module 'stripe' {
id: string,
params?: PersonUpdateParams,
options?: RequestOptions
): Promise<Stripe.Person>;
): Promise<Stripe.Response<Stripe.Person>>;

/**
* Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
Expand All @@ -2613,12 +2627,12 @@ declare module 'stripe' {
id: string,
params?: PersonDeleteParams,
options?: RequestOptions
): Promise<Stripe.DeletedPerson>;
): Promise<Stripe.Response<Stripe.DeletedPerson>>;
deletePerson(
accountId: string,
id: string,
options?: RequestOptions
): Promise<Stripe.DeletedPerson>;
): Promise<Stripe.Response<Stripe.DeletedPerson>>;
}
}
}
10 changes: 5 additions & 5 deletions types/2020-03-02/ApplePayDomains.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ declare module 'stripe' {
create(
params: ApplePayDomainCreateParams,
options?: RequestOptions
): Promise<Stripe.ApplePayDomain>;
): Promise<Stripe.Response<Stripe.ApplePayDomain>>;

/**
* Retrieve an apple pay domain.
Expand All @@ -93,11 +93,11 @@ declare module 'stripe' {
id: string,
params?: ApplePayDomainRetrieveParams,
options?: RequestOptions
): Promise<Stripe.ApplePayDomain>;
): Promise<Stripe.Response<Stripe.ApplePayDomain>>;
retrieve(
id: string,
options?: RequestOptions
): Promise<Stripe.ApplePayDomain>;
): Promise<Stripe.Response<Stripe.ApplePayDomain>>;

/**
* List apple pay domains.
Expand All @@ -115,11 +115,11 @@ declare module 'stripe' {
id: string,
params?: ApplePayDomainDeleteParams,
options?: RequestOptions
): Promise<Stripe.DeletedApplePayDomain>;
): Promise<Stripe.Response<Stripe.DeletedApplePayDomain>>;
del(
id: string,
options?: RequestOptions
): Promise<Stripe.DeletedApplePayDomain>;
): Promise<Stripe.Response<Stripe.DeletedApplePayDomain>>;
}
}
}
14 changes: 7 additions & 7 deletions types/2020-03-02/ApplicationFees.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ declare module 'stripe' {
id: string,
params?: ApplicationFeeRetrieveParams,
options?: RequestOptions
): Promise<Stripe.ApplicationFee>;
): Promise<Stripe.Response<Stripe.ApplicationFee>>;
retrieve(
id: string,
options?: RequestOptions
): Promise<Stripe.ApplicationFee>;
): Promise<Stripe.Response<Stripe.ApplicationFee>>;

/**
* Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
Expand All @@ -135,11 +135,11 @@ declare module 'stripe' {
id: string,
params?: FeeRefundCreateParams,
options?: RequestOptions
): Promise<Stripe.FeeRefund>;
): Promise<Stripe.Response<Stripe.FeeRefund>>;
createRefund(
id: string,
options?: RequestOptions
): Promise<Stripe.FeeRefund>;
): Promise<Stripe.Response<Stripe.FeeRefund>>;

/**
* By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.
Expand All @@ -149,12 +149,12 @@ declare module 'stripe' {
id: string,
params?: FeeRefundRetrieveParams,
options?: RequestOptions
): Promise<Stripe.FeeRefund>;
): Promise<Stripe.Response<Stripe.FeeRefund>>;
retrieveRefund(
feeId: string,
id: string,
options?: RequestOptions
): Promise<Stripe.FeeRefund>;
): Promise<Stripe.Response<Stripe.FeeRefund>>;

/**
* Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Expand All @@ -166,7 +166,7 @@ declare module 'stripe' {
id: string,
params?: FeeRefundUpdateParams,
options?: RequestOptions
): Promise<Stripe.FeeRefund>;
): Promise<Stripe.Response<Stripe.FeeRefund>>;

/**
* You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.
Expand Down
6 changes: 4 additions & 2 deletions types/2020-03-02/Balance.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,10 @@ declare module 'stripe' {
retrieve(
params?: BalanceRetrieveParams,
options?: RequestOptions
): Promise<Stripe.Balance>;
retrieve(options?: RequestOptions): Promise<Stripe.Balance>;
): Promise<Stripe.Response<Stripe.Balance>>;
retrieve(
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Balance>>;
}
}
}
4 changes: 2 additions & 2 deletions types/2020-03-02/BalanceTransactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ declare module 'stripe' {
id: string,
params?: BalanceTransactionRetrieveParams,
options?: RequestOptions
): Promise<Stripe.BalanceTransaction>;
): Promise<Stripe.Response<Stripe.BalanceTransaction>>;
retrieve(
id: string,
options?: RequestOptions
): Promise<Stripe.BalanceTransaction>;
): Promise<Stripe.Response<Stripe.BalanceTransaction>>;

/**
* Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
Expand Down
2 changes: 1 addition & 1 deletion types/2020-03-02/BillingPortal/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ declare module 'stripe' {
create(
params: SessionCreateParams,
options?: RequestOptions
): Promise<Stripe.BillingPortal.Session>;
): Promise<Stripe.Response<Stripe.BillingPortal.Session>>;
}
}
}
Expand Down
Loading

0 comments on commit df22a30

Please sign in to comment.