From 1cffd53efaeef26d9ffe6609b7d20f4a29e329f8 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Wed, 22 Jan 2020 17:23:02 -0800 Subject: [PATCH] Codegen for openapi 5013467 --- lib/resources/Accounts.js | 10 +++++----- lib/resources/Customers.js | 10 +++++----- lib/resources/Invoices.js | 10 +++++----- lib/resources/Subscriptions.js | 2 +- types/2019-12-03/Customers.d.ts | 5 ++++- types/2019-12-03/Invoices.d.ts | 5 ++++- types/2019-12-03/TaxIds.d.ts | 10 ++++++++-- 7 files changed, 32 insertions(+), 20 deletions(-) diff --git a/lib/resources/Accounts.js b/lib/resources/Accounts.js index 7b405c8a2d..7c38021e25 100644 --- a/lib/resources/Accounts.js +++ b/lib/resources/Accounts.js @@ -7,6 +7,11 @@ const stripeMethod = StripeResource.method; module.exports = StripeResource.extend({ path: '', + reject: stripeMethod({ + method: 'POST', + path: 'accounts/{account}/reject', + }), + create: stripeMethod({ method: 'POST', path: 'accounts', @@ -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 diff --git a/lib/resources/Customers.js b/lib/resources/Customers.js index a43741cae6..60efa6ff9d 100644 --- a/lib/resources/Customers.js +++ b/lib/resources/Customers.js @@ -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', @@ -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', diff --git a/lib/resources/Invoices.js b/lib/resources/Invoices.js index d958d07b4d..1720304af7 100644 --- a/lib/resources/Invoices.js +++ b/lib/resources/Invoices.js @@ -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', diff --git a/lib/resources/Subscriptions.js b/lib/resources/Subscriptions.js index 11edc64490..a72ebe447f 100644 --- a/lib/resources/Subscriptions.js +++ b/lib/resources/Subscriptions.js @@ -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', diff --git a/types/2019-12-03/Customers.d.ts b/types/2019-12-03/Customers.d.ts index 1cca27e7b3..411f92b2f4 100644 --- a/types/2019-12-03/Customers.d.ts +++ b/types/2019-12-03/Customers.d.ts @@ -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; @@ -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'; } diff --git a/types/2019-12-03/Invoices.d.ts b/types/2019-12-03/Invoices.d.ts index e82dfaeacd..ac0745ca63 100644 --- a/types/2019-12-03/Invoices.d.ts +++ b/types/2019-12-03/Invoices.d.ts @@ -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; @@ -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'; diff --git a/types/2019-12-03/TaxIds.d.ts b/types/2019-12-03/TaxIds.d.ts index 544b9f7bdd..1464c46e73 100644 --- a/types/2019-12-03/TaxIds.d.ts +++ b/types/2019-12-03/TaxIds.d.ts @@ -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; @@ -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'; @@ -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; @@ -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'; }