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 support for new type on CustomerTaxId #776

Merged
merged 1 commit into from
Jan 23, 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: 5 additions & 5 deletions lib/resources/Accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ const stripeMethod = StripeResource.method;
module.exports = StripeResource.extend({
path: '',

reject: stripeMethod({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flagging that something changed to change the order on some methods. It's not breaking so I'm leaving it but we need to fix codegen to avoid that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @richardm-stripe as we're merging but this is something that needs to be fixed soon in codegen

method: 'POST',
path: 'accounts/{account}/reject',
}),

create: stripeMethod({
method: 'POST',
path: 'accounts',
Expand All @@ -23,11 +28,6 @@ module.exports = StripeResource.extend({
methodType: 'list',
}),

reject: stripeMethod({
method: 'POST',
path: 'accounts/{account}/reject',
}),

retrieve(id) {
// No longer allow an api key to be passed as the first string to this function due to ambiguity between
// old account ids and api keys. To request the account for an api key, send null as the id
Expand Down
10 changes: 5 additions & 5 deletions lib/resources/Customers.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ module.exports = StripeResource.extend({
path: '/{customer}/sources',
}),

deleteSource: stripeMethod({
method: 'DELETE',
path: '/{customer}/sources/{id}',
}),

listSources: stripeMethod({
method: 'GET',
path: '/{customer}/sources',
Expand All @@ -60,6 +55,11 @@ module.exports = StripeResource.extend({
path: '/{customer}/sources/{id}',
}),

deleteSource: stripeMethod({
method: 'DELETE',
path: '/{customer}/sources/{id}',
}),

verifySource: stripeMethod({
method: 'POST',
path: '/{customer}/sources/{id}/verify',
Expand Down
10 changes: 5 additions & 5 deletions lib/resources/Invoices.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ module.exports = StripeResource.extend({
path: '/{invoice}/pay',
}),

retrieveUpcoming: stripeMethod({
method: 'GET',
path: '/upcoming',
}),

sendInvoice: stripeMethod({
method: 'POST',
path: '/{invoice}/send',
}),

retrieveUpcoming: stripeMethod({
method: 'GET',
path: '/upcoming',
}),

voidInvoice: stripeMethod({
method: 'POST',
path: '/{invoice}/void',
Expand Down
2 changes: 1 addition & 1 deletion lib/resources/Subscriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const stripeMethod = StripeResource.method;
module.exports = StripeResource.extend({
path: 'subscriptions',

includeBasic: ['create', 'del', 'list', 'retrieve', 'update'],
includeBasic: ['create', 'list', 'retrieve', 'update', 'del'],

deleteDiscount: stripeMethod({
method: 'DELETE',
Expand Down
5 changes: 4 additions & 1 deletion types/2019-12-03/Customers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ declare module 'stripe' {

interface TaxIdDatum {
/**
* Type of the tax ID, one of `au_abn`, `ch_vat`, `eu_vat`, `in_gst`, `mx_rfc`, `no_vat`, `nz_gst`, `sg_uen`, or `za_vat`
* Type of the tax ID, one of `au_abn`, `ca_bn`, `ch_vat`, `eu_vat`, `hk_br`, `in_gst`, `mx_rfc`, `no_vat`, `nz_gst`, `ru_inn`, `sg_uen`, or `za_vat`
*/
type: TaxIdDatum.Type;

Expand All @@ -344,12 +344,15 @@ declare module 'stripe' {
namespace TaxIdDatum {
type Type =
| 'au_abn'
| 'ca_bn'
| 'ch_vat'
| 'eu_vat'
| 'hk_br'
| 'in_gst'
| 'mx_rfc'
| 'no_vat'
| 'nz_gst'
| 'ru_inn'
| 'sg_uen'
| 'za_vat';
}
Expand Down
5 changes: 4 additions & 1 deletion types/2019-12-03/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ declare module 'stripe' {

interface CustomerTaxId {
/**
* The type of the tax ID, one of `au_abn`, `ch_vat`, `eu_vat`, `in_gst`, `mx_rfc`, `no_vat`, `nz_gst`, `sg_uen`, `unknown`, or `za_vat`
* The type of the tax ID, one of `au_abn`, `ca_bn`, `ch_vat`, `eu_vat`, `hk_br`, `in_gst`, `mx_rfc`, `no_vat`, `nz_gst`, `ru_inn`, `sg_uen`, `unknown`, or `za_vat`
*/
type: CustomerTaxId.Type;

Expand All @@ -372,12 +372,15 @@ declare module 'stripe' {
namespace CustomerTaxId {
type Type =
| 'au_abn'
| 'ca_bn'
| 'ch_vat'
| 'eu_vat'
| 'hk_br'
| 'in_gst'
| 'mx_rfc'
| 'no_vat'
| 'nz_gst'
| 'ru_inn'
| 'sg_uen'
| 'unknown'
| 'za_vat';
Expand Down
10 changes: 8 additions & 2 deletions types/2019-12-03/TaxIds.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ declare module 'stripe' {
livemode: boolean;

/**
* Type of the tax ID, one of `au_abn`, `ch_vat`, `eu_vat`, `in_gst`, `mx_rfc`, `no_vat`, `nz_gst`, `sg_uen`, `za_vat`, or `unknown`
* Type of the tax ID, one of `au_abn`, `ca_bn`, `ch_vat`, `eu_vat`, `hk_br`, `in_gst`, `mx_rfc`, `no_vat`, `nz_gst`, `ru_inn`, `sg_uen`, `za_vat`, or `unknown`
*/
type: TaxId.Type;

Expand All @@ -52,12 +52,15 @@ declare module 'stripe' {
namespace TaxId {
type Type =
| 'au_abn'
| 'ca_bn'
| 'ch_vat'
| 'eu_vat'
| 'hk_br'
| 'in_gst'
| 'mx_rfc'
| 'no_vat'
| 'nz_gst'
| 'ru_inn'
| 'sg_uen'
| 'unknown'
| 'za_vat';
Expand Down Expand Up @@ -106,7 +109,7 @@ declare module 'stripe' {

interface TaxIdCreateParams {
/**
* Type of the tax ID, one of `au_abn`, `ch_vat`, `eu_vat`, `in_gst`, `mx_rfc`, `no_vat`, `nz_gst`, `sg_uen`, or `za_vat`
* Type of the tax ID, one of `au_abn`, `ca_bn`, `ch_vat`, `eu_vat`, `hk_br`, `in_gst`, `mx_rfc`, `no_vat`, `nz_gst`, `ru_inn`, `sg_uen`, or `za_vat`
*/
type: TaxIdCreateParams.Type;

Expand All @@ -124,12 +127,15 @@ declare module 'stripe' {
namespace TaxIdCreateParams {
type Type =
| 'au_abn'
| 'ca_bn'
| 'ch_vat'
| 'eu_vat'
| 'hk_br'
| 'in_gst'
| 'mx_rfc'
| 'no_vat'
| 'nz_gst'
| 'ru_inn'
| 'sg_uen'
| 'za_vat';
}
Expand Down