Skip to content

Commit

Permalink
Merge pull request #859 from stripe/remi/codegen-afb5b18
Browse files Browse the repository at this point in the history
Add support for `calculatedStatementDescriptor` on `Charge`
  • Loading branch information
remi-stripe authored Apr 3, 2020
2 parents 353ffc3 + 8d40191 commit 902a2fa
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 50 deletions.
5 changes: 5 additions & 0 deletions types/2020-03-02/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ declare module 'stripe' {

billing_details: Charge.BillingDetails;

/**
* The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.
*/
calculated_statement_descriptor: string | null;

/**
* If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
*/
Expand Down
8 changes: 3 additions & 5 deletions types/2020-03-02/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ declare module 'stripe' {
* that provides limited access to your products, and a
* 15/month plan that allows full access.
*
* Related guide: [Managing Products and Plans](https://stripe.com/docs/billing/subscriptions/products-and-plans).
* Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and plans](https://stripe.com/docs/billing/subscriptions/products-and-plans).
*/
plan?: Stripe.Plan;

Expand Down Expand Up @@ -694,11 +694,9 @@ declare module 'stripe' {
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* Providing this parameter will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
* Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
*
* For more, learn to [save card details during payment](https://stripe.com/docs/payments/save-during-payment).
*
* Stripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by [SCA](https://stripe.com/docs/strong-customer-authentication), using `off_session` will ensure that they are authenticated while processing this PaymentIntent. You will then be able to collect [off-session payments](https://stripe.com/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.
* When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
*/
setup_future_usage?: PaymentIntentData.SetupFutureUsage;

Expand Down
31 changes: 16 additions & 15 deletions types/2020-03-02/Issuing/Authorizations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ declare module 'stripe' {
authorization_method: Authorization.AuthorizationMethod;

/**
* The amount that has been authorized. This will be `0` when the object is created, and increase after it has been approved.
* [DEPRECATED] The amount that has been authorized. This will be `0` when the object is created, and increase after it has been approved.
*/
authorized_amount?: number;

/**
* The currency that was presented to the cardholder for the authorization. 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).
* [DEPRECATED] The currency that was presented to the cardholder for the authorization. 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).
*/
authorized_currency?: string;

Expand Down Expand Up @@ -66,17 +66,17 @@ declare module 'stripe' {
currency: string;

/**
* The amount the authorization is expected to be in `held_currency`. When Stripe holds funds from you, this is the amount reserved for the authorization. This will be `0` when the object is created, and increase after it has been approved. For multi-currency transactions, `held_amount` can be used to determine the expected exchange rate.
* [DEPRECATED] The amount the authorization is expected to be in `held_currency`. When Stripe holds funds from you, this is the amount reserved for the authorization. This will be `0` when the object is created, and increase after it has been approved. For multi-currency transactions, `held_amount` can be used to determine the expected exchange rate.
*/
held_amount?: number;

/**
* The currency of the [held amount](https://stripe.com/docs/api#issuing_authorization_object-held_amount). This will always be the card currency.
* [DEPRECATED] The currency of the [held amount](https://stripe.com/docs/api#issuing_authorization_object-held_amount). This will always be the card currency.
*/
held_currency?: string;

/**
* If set `true`, you may provide [held_amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-held_amount) to control how much to hold for the authorization.
* [DEPRECATED] If set `true`, you may provide [held_amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-held_amount) to control how much to hold for the authorization.
*/
is_held_amount_controllable?: boolean;

Expand All @@ -103,17 +103,17 @@ declare module 'stripe' {
metadata: Metadata;

/**
* The amount the user is requesting to be authorized. This field will only be non-zero during an `issuing.authorization.request` webhook.
* [DEPRECATED] The amount the user is requesting to be authorized. This field will only be non-zero during an `issuing_authorization.request` webhook.
*/
pending_authorized_amount?: number;

/**
* The additional amount Stripe will hold if the authorization is approved. This field will only be non-zero during an `issuing.authorization.request` webhook.
* [DEPRECATED] The additional amount Stripe will hold if the authorization is approved. This field will only be non-zero during an `issuing_authorization.request` webhook.
*/
pending_held_amount?: number;

/**
* The pending authorization request. This field will only be non-null during an `issuing.authorization.request` webhook.
* The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook.
*/
pending_request: Authorization.PendingRequest | null;

Expand Down Expand Up @@ -224,7 +224,7 @@ declare module 'stripe' {

interface RequestHistory {
/**
* The amount of the authorization is your card's currency. Stripe held this amount from your account to fund the authorization, if the request was approved
* The amount of the authorization in your card's currency. Stripe held this amount from your account to fund the authorization, if the request was approved.
*/
amount: number;

Expand All @@ -234,12 +234,12 @@ declare module 'stripe' {
approved: boolean;

/**
* The amount that was authorized at the time of this request
* [DEPRECATED] The amount that was authorized at the time of this request.
*/
authorized_amount?: number;

/**
* The currency that was presented to the cardholder for the authorization. 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).
* [DEPRECATED] The currency that was presented to the cardholder for the authorization. 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).
*/
authorized_currency?: string;

Expand All @@ -254,17 +254,17 @@ declare module 'stripe' {
currency: string;

/**
* The amount Stripe held from your account to fund the authorization, if the request was approved
* [DEPRECATED] The amount Stripe held from your account to fund the authorization, if the request was approved.
*/
held_amount?: number;

/**
* The currency of the [held amount](https://stripe.com/docs/api#issuing_authorization_object-held_amount)
* [DEPRECATED] The currency of the [held amount](https://stripe.com/docs/api#issuing_authorization_object-held_amount).
*/
held_currency?: string;

/**
* The amount that was authorized at the time of this request
* The amount that was authorized at the time of this request.
*/
merchant_amount: number;

Expand All @@ -289,6 +289,7 @@ declare module 'stripe' {
namespace RequestHistory {
type Reason =
| 'account_compliance_disabled'
| 'account_disabled'
| 'account_inactive'
| 'authentication_failed'
| 'authorization_controls'
Expand Down Expand Up @@ -458,7 +459,7 @@ declare module 'stripe' {
expand?: Array<string>;

/**
* If the authorization's `is_held_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request).
* [DEPRECATED] If the authorization's `is_held_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request).
*/
held_amount?: number;

Expand Down
4 changes: 2 additions & 2 deletions types/2020-03-02/Issuing/Cardholders.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,7 @@ declare module 'stripe' {
name: string;

/**
* One of `individual`, `business_entity`, or `company`.
* One of `individual` or `company`.
*/
type: CardholderCreateParams.Type;

Expand Down Expand Up @@ -6116,7 +6116,7 @@ declare module 'stripe' {
status?: CardholderListParams.Status;

/**
* Only return cardholders that have the given type. One of `individual`, `business_entity`, or `company`.
* Only return cardholders that have the given type. One of `individual` or `company`.
*/
type?: CardholderListParams.Type;
}
Expand Down
16 changes: 8 additions & 8 deletions types/2020-03-02/Issuing/Cards.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ declare module 'stripe' {
currency?: string | null;

/**
* Maximum count of approved authorizations on this card. Counts all authorizations retroactively.
* [DEPRECATED] Maximum count of approved authorizations on this card. Counts all authorizations retroactively.
*/
max_approvals: number | null;
max_approvals?: number | null;

/**
* Limit the spending with rules based on time intervals and categories.
Expand Down Expand Up @@ -1140,9 +1140,9 @@ declare module 'stripe' {
currency?: string | null;

/**
* Maximum count of approved authorizations on this card. Counts all authorizations retroactively.
* [DEPRECATED] Maximum count of approved authorizations on this card. Counts all authorizations retroactively.
*/
max_approvals: number | null;
max_approvals?: number | null;

/**
* Limit the spending with rules based on time intervals and categories.
Expand Down Expand Up @@ -2129,7 +2129,7 @@ declare module 'stripe' {
blocked_categories?: Array<AuthorizationControls.BlockedCategory>;

/**
* Maximum count of approved authorizations on this card. Counts all authorizations retroactively.
* [DEPRECATED] Maximum count of approved authorizations on this card. Counts all authorizations retroactively.
*/
max_approvals?: number;

Expand Down Expand Up @@ -3119,7 +3119,7 @@ declare module 'stripe' {
blocked_categories?: Array<SpendingControls.BlockedCategory>;

/**
* Maximum count of approved authorizations on this card. Counts all authorizations retroactively.
* [DEPRECATED] Maximum count of approved authorizations on this card. Counts all authorizations retroactively.
*/
max_approvals?: number;

Expand Down Expand Up @@ -4080,7 +4080,7 @@ declare module 'stripe' {
blocked_categories?: Array<AuthorizationControls.BlockedCategory>;

/**
* Maximum count of approved authorizations on this card. Counts all authorizations retroactively.
* [DEPRECATED] Maximum count of approved authorizations on this card. Counts all authorizations retroactively.
*/
max_approvals?: number;

Expand Down Expand Up @@ -5001,7 +5001,7 @@ declare module 'stripe' {
blocked_categories?: Array<SpendingControls.BlockedCategory>;

/**
* Maximum count of approved authorizations on this card. Counts all authorizations retroactively.
* [DEPRECATED] Maximum count of approved authorizations on this card. Counts all authorizations retroactively.
*/
max_approvals?: number;

Expand Down
2 changes: 1 addition & 1 deletion types/2020-03-02/Issuing/Transactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ declare module 'stripe' {
currency: string;

/**
* If you've disputed the transaction, the ID of the [dispute object](https://stripe.com/docs/api/issuing/disputes/object).
* If you've disputed the transaction, the ID of the dispute.
*/
dispute: string | Stripe.Issuing.Dispute | null;

Expand Down
Loading

0 comments on commit 902a2fa

Please sign in to comment.