Skip to content

Commit

Permalink
Merge pull request #821 from stripe/remi/codegen-5ecc185
Browse files Browse the repository at this point in the history
Make `type` on `AccountLink` an enum
  • Loading branch information
remi-stripe authored Feb 27, 2020
2 parents c7fa2d2 + f0151b5 commit 28e5f59
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
4 changes: 3 additions & 1 deletion types/2019-12-03/AccountLinks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ declare module 'stripe' {
/**
* The type of account link the user is requesting. Possible values are `custom_account_verification` or `custom_account_update`.
*/
type: string;
type: AccountLinkCreateParams.Type;

/**
* Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`.
Expand All @@ -59,6 +59,8 @@ declare module 'stripe' {

namespace AccountLinkCreateParams {
type Collect = 'currently_due' | 'eventually_due';

type Type = 'custom_account_update' | 'custom_account_verification';
}

class AccountLinksResource {
Expand Down
8 changes: 4 additions & 4 deletions types/2019-12-03/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ declare module 'stripe' {
transfer_data: Charge.TransferData | null;

/**
* A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#grouping-transactions) for details.
* A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.
*/
transfer_group: string | null;
}
Expand Down Expand Up @@ -1276,7 +1276,7 @@ declare module 'stripe' {
transfer_data?: ChargeCreateParams.TransferData;

/**
* A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/charges-transfers#grouping-transactions).
* A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/charges-transfers#transfer-options).
*/
transfer_group?: string;
}
Expand Down Expand Up @@ -1378,7 +1378,7 @@ declare module 'stripe' {
shipping?: ChargeUpdateParams.Shipping;

/**
* A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#grouping-transactions) for details.
* A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.
*/
transfer_group?: string;
}
Expand Down Expand Up @@ -1489,7 +1489,7 @@ declare module 'stripe' {
transfer_data?: ChargeCaptureParams.TransferData;

/**
* A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#grouping-transactions) for details.
* A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.
*/
transfer_group?: string;
}
Expand Down
8 changes: 6 additions & 2 deletions types/2019-12-03/SubscriptionItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ declare module 'stripe' {
metadata?: MetadataParam;

/**
* Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
* Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
*
* Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
*
* Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
*/
Expand Down Expand Up @@ -194,7 +196,9 @@ declare module 'stripe' {
off_session?: boolean;

/**
* Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
* Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
*
* Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
*
* Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
*/
Expand Down
6 changes: 5 additions & 1 deletion types/2019-12-03/Subscriptions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ declare module 'stripe' {
* Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
*
* Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
*
* `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription.
*/
payment_behavior?: SubscriptionCreateParams.PaymentBehavior;

Expand Down Expand Up @@ -570,7 +572,9 @@ declare module 'stripe' {
off_session?: boolean;

/**
* Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
* Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
*
* Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
*
* Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
*/
Expand Down
4 changes: 2 additions & 2 deletions types/2019-12-03/Transfers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ declare module 'stripe' {
source_type: string | null;

/**
* A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#grouping-transactions) for details.
* A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.
*/
transfer_group: string | null;
}
Expand Down Expand Up @@ -132,7 +132,7 @@ declare module 'stripe' {
source_type?: TransferCreateParams.SourceType;

/**
* A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#grouping-transactions) for details.
* A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.
*/
transfer_group?: string;
}
Expand Down

0 comments on commit 28e5f59

Please sign in to comment.