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

Add metadata on Checkout Session and remove deprecated features #771

Merged
merged 1 commit into from
Jan 17, 2020
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
10 changes: 10 additions & 0 deletions types/2019-12-03/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ declare module 'stripe' {
*/
locale: Session.Locale | null;

/**
* Set of key-value pairs 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 mode of the Checkout Session, one of `payment`, `setup`, or `subscription`.
*/
Expand Down Expand Up @@ -251,6 +256,11 @@ declare module 'stripe' {
*/
locale?: SessionCreateParams.Locale;

/**
* Set of key-value pairs 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 mode of the Checkout Session, one of `payment`, `setup`, or `subscription`.
*/
Expand Down
10 changes: 0 additions & 10 deletions types/2019-12-03/Issuing/Cardholders.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2096,11 +2096,6 @@ declare module 'stripe' {

interface Billing {
address: Billing.Address;

/**
* Deprecated param. Passing value for this param is simply discarded. It will be removed in the next client library major version
*/
name?: string;
}

namespace Billing {
Expand Down Expand Up @@ -3176,11 +3171,6 @@ declare module 'stripe' {

interface Billing {
address: Billing.Address;

/**
* Deprecated param. Passing value for this param is simply discarded. It will be removed in the next client library major version
*/
name?: string;
}

namespace Billing {
Expand Down
9 changes: 2 additions & 7 deletions types/2019-12-03/Issuing/Cards.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1065,11 +1065,6 @@ declare module 'stripe' {
*/
name: string;

/**
* Deprecated field. It always return null and will be removed in the next client library major version
*/
phone: string | null;

/**
* The delivery status of the card.
*/
Expand Down Expand Up @@ -1119,7 +1114,7 @@ declare module 'stripe' {
/**
* The type of card to issue. Possible values are `physical` or `virtual`.
*/
type: string | CardCreateParams.Type;
type: CardCreateParams.Type;

/**
* Spending rules that give you some control over how your cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/authorizations) documentation for more details.
Expand Down Expand Up @@ -2094,7 +2089,7 @@ declare module 'stripe' {
/**
* Packaging options.
*/
type?: string | Shipping.Type;
type?: Shipping.Type;
}

namespace Shipping {
Expand Down
2 changes: 1 addition & 1 deletion types/2019-12-03/Products.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ declare module 'stripe' {
/**
* Whether the product is currently available for purchase.
*/
active: boolean | null;
active: boolean;

/**
* A list of up to 5 attributes that each SKU can provide values for (e.g., `["color", "size"]`).
Expand Down
2 changes: 1 addition & 1 deletion types/2019-12-03/SetupIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ declare module 'stripe' {
/**
* Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`.
*/
usage?: string | SetupIntentCreateParams.Usage;
usage?: SetupIntentCreateParams.Usage;
}

namespace SetupIntentCreateParams {
Expand Down
5 changes: 0 additions & 5 deletions types/2019-12-03/Terminal/ConnectionTokens.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ declare module 'stripe' {
* The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers.
*/
location?: string;

/**
* To [group objects](https://stripe.com/docs/terminal/payments/connect#grouping-objects-by-connected-account) on your platform account by connected account, set this parameter to the connected account ID.
*/
operator_account?: string;
}

class ConnectionTokensResource {
Expand Down
27 changes: 1 addition & 26 deletions types/2019-12-03/Terminal/Locations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ declare module 'stripe' {
* Set of key-value pairs 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;

/**
* To [group objects](https://stripe.com/docs/terminal/payments/connect#grouping-objects-by-connected-account) on your platform account by connected account, set this parameter to the connected account ID.
*/
operator_account?: string;
}

namespace LocationCreateParams {
Expand All @@ -103,11 +98,6 @@ declare module 'stripe' {
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;

/**
* To [group objects](https://stripe.com/docs/terminal/payments/connect#grouping-objects-by-connected-account) on your platform account by connected account, set this parameter to the connected account ID.
*/
operator_account?: string;
}

interface LocationUpdateParams {
Expand All @@ -130,11 +120,6 @@ declare module 'stripe' {
* Set of key-value pairs 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;

/**
* To [group objects](https://stripe.com/docs/terminal/payments/connect#grouping-objects-by-connected-account) on your platform account by connected account, set this parameter to the connected account ID.
*/
operator_account?: string;
}

namespace LocationUpdateParams {
Expand All @@ -158,19 +143,9 @@ declare module 'stripe' {
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;

/**
* To [group objects](https://stripe.com/docs/terminal/payments/connect#grouping-objects-by-connected-account) on your platform account by connected account, set this parameter to the connected account ID.
*/
operator_account?: string;
}

interface LocationDeleteParams {
/**
* To [group objects](https://stripe.com/docs/terminal/payments/connect#grouping-objects-by-connected-account) on your platform account by connected account, set this parameter to the connected account ID.
*/
operator_account?: string;
}
interface LocationDeleteParams {}

class LocationsResource {
/**
Expand Down
31 changes: 3 additions & 28 deletions types/2019-12-03/Terminal/Readers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,23 +112,13 @@ declare module 'stripe' {
* Set of key-value pairs 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;

/**
* To [group objects](https://stripe.com/docs/terminal/payments/connect#grouping-objects-by-connected-account) on your platform account by connected account, set this parameter to the connected account ID.
*/
operator_account?: string;
}

interface ReaderRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;

/**
* To [group objects](https://stripe.com/docs/terminal/payments/connect#grouping-objects-by-connected-account) on your platform account by connected account, set this parameter to the connected account ID.
*/
operator_account?: string;
}

interface ReaderUpdateParams {
Expand All @@ -146,18 +136,13 @@ declare module 'stripe' {
* Set of key-value pairs 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;

/**
* To [group objects](https://stripe.com/docs/terminal/payments/connect#grouping-objects-by-connected-account) on your platform account by connected account, set this parameter to the connected account ID.
*/
operator_account?: string;
}

interface ReaderListParams extends PaginationParams {
/**
* Filters readers by device type
*/
device_type?: string | ReaderListParams.DeviceType;
device_type?: ReaderListParams.DeviceType;

/**
* Specifies which fields in the response should be expanded.
Expand All @@ -169,15 +154,10 @@ declare module 'stripe' {
*/
location?: string;

/**
* To [group objects](https://stripe.com/docs/terminal/payments/connect#grouping-objects-by-connected-account) on your platform account by connected account, set this parameter to the connected account ID.
*/
operator_account?: string;

/**
* A status filter to filter readers to only offline or online readers
*/
status?: string | ReaderListParams.Status;
status?: ReaderListParams.Status;
}

namespace ReaderListParams {
Expand All @@ -186,12 +166,7 @@ declare module 'stripe' {
type Status = 'offline' | 'online';
}

interface ReaderDeleteParams {
/**
* To [group objects](https://stripe.com/docs/terminal/payments/connect#grouping-objects-by-connected-account) on your platform account by connected account, set this parameter to the connected account ID.
*/
operator_account?: string;
}
interface ReaderDeleteParams {}

class ReadersResource {
/**
Expand Down