Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #1265

Merged
merged 1 commit into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ declare module 'stripe' {
*/
payment_status: Session.PaymentStatus;

phone_number_collection?: Session.PhoneNumberCollection;

/**
* The ID of the original expired Checkout Session that triggered the recovery flow.
*/
Expand Down Expand Up @@ -279,6 +281,11 @@ declare module 'stripe' {
*/
email: string | null;

/**
* The customer's phone number at the time of checkout
*/
phone?: string | null;

/**
* The customer's tax exempt status at time of checkout.
*/
Expand Down Expand Up @@ -471,6 +478,13 @@ declare module 'stripe' {

type PaymentStatus = 'no_payment_required' | 'paid' | 'unpaid';

interface PhoneNumberCollection {
/**
* Indicates whether phone number collection is enabled for the session
*/
enabled: boolean;
}

interface Shipping {
address?: Stripe.Address;

Expand Down Expand Up @@ -954,6 +968,14 @@ declare module 'stripe' {
*/
payment_method_types?: Array<SessionCreateParams.PaymentMethodType>;

/**
* Controls phone number collection settings for the session.
*
* We recommend that you review your privacy policy and check with your legal contacts
* before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).
*/
phone_number_collection?: SessionCreateParams.PhoneNumberCollection;

/**
* A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.
*/
Expand Down Expand Up @@ -1545,6 +1567,13 @@ declare module 'stripe' {
| 'sofort'
| 'wechat_pay';

interface PhoneNumberCollection {
/**
* Set to `true` to enable phone number collection.
*/
enabled: boolean;
}

interface SetupIntentData {
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
Expand Down
8 changes: 4 additions & 4 deletions types/2020-08-27/PaymentMethods.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1145,14 +1145,14 @@ declare module 'stripe' {

interface PaymentMethodListParams extends PaginationParams {
/**
* The ID of the customer whose PaymentMethods will be retrieved.
* A required filter on the list, based on the object `type` field.
*/
customer: string;
type: PaymentMethodListParams.Type;

/**
* A required filter on the list, based on the object `type` field.
* The ID of the customer whose PaymentMethods will be retrieved.
*/
type: PaymentMethodListParams.Type;
customer?: string;

/**
* Specifies which fields in the response should be expanded.
Expand Down
6 changes: 4 additions & 2 deletions types/2020-08-27/Radar/ValueLists.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ declare module 'stripe' {
deleted?: void;

/**
* The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, or `case_sensitive_string`.
* The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`.
*/
item_type: ValueList.ItemType;

Expand Down Expand Up @@ -66,6 +66,7 @@ declare module 'stripe' {
| 'card_fingerprint'
| 'case_sensitive_string'
| 'country'
| 'customer_id'
| 'email'
| 'ip_address'
| 'string';
Expand Down Expand Up @@ -108,7 +109,7 @@ declare module 'stripe' {
expand?: Array<string>;

/**
* Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, or `case_sensitive_string`. Use `string` if the item type is unknown or mixed.
* Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed.
*/
item_type?: ValueListCreateParams.ItemType;

Expand All @@ -124,6 +125,7 @@ declare module 'stripe' {
| 'card_fingerprint'
| 'case_sensitive_string'
| 'country'
| 'customer_id'
| 'email'
| 'ip_address'
| 'string';
Expand Down
12 changes: 9 additions & 3 deletions types/2020-08-27/Terminal/Readers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ declare module 'stripe' {
device_sw_version: string | null;

/**
* Type of reader, one of `bbpos_chipper2x` or `verifone_P400`.
* Type of reader, one of `bbpos_chipper2x`, `bbpos_wisepos_e`, or `verifone_P400`.
*/
device_type: Reader.DeviceType;

Expand Down Expand Up @@ -66,7 +66,10 @@ declare module 'stripe' {
}

namespace Reader {
type DeviceType = 'bbpos_chipper2x' | 'verifone_P400';
type DeviceType =
| 'bbpos_chipper2x'
| 'bbpos_wisepos_e'
| 'verifone_P400';
}

/**
Expand Down Expand Up @@ -163,7 +166,10 @@ declare module 'stripe' {
}

namespace ReaderListParams {
type DeviceType = 'bbpos_chipper2x' | 'verifone_P400';
type DeviceType =
| 'bbpos_chipper2x'
| 'bbpos_wisepos_e'
| 'verifone_P400';

type Status = 'offline' | 'online';
}
Expand Down