From f0e777561bc859ccdb2a4b464e9db2e6a6f21dda Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Wed, 8 Feb 2023 14:53:06 -0800 Subject: [PATCH] Codegen for openapi v223 --- lib/apiVersion.js | 3 - lib/resources.js | 125 ---- lib/resources/AccountLinks.js | 10 - lib/resources/Accounts.js | 107 --- lib/resources/ApplePayDomains.js | 23 - lib/resources/ApplicationFees.js | 32 - lib/resources/Apps/Secrets.js | 23 - lib/resources/Balance.js | 10 - lib/resources/BalanceTransactions.js | 15 - lib/resources/BillingPortal/Configurations.js | 23 - lib/resources/BillingPortal/Sessions.js | 10 - lib/resources/Charges.js | 32 - lib/resources/Checkout/Sessions.js | 28 - lib/resources/CountrySpecs.js | 15 - lib/resources/Coupons.js | 27 - lib/resources/CreditNotes.js | 41 -- lib/resources/Customers.js | 125 ---- lib/resources/Disputes.js | 23 - lib/resources/EphemeralKeys.js | 19 - lib/resources/Events.js | 15 - lib/resources/ExchangeRates.js | 15 - lib/resources/FileLinks.js | 23 - lib/resources/Files.js | 25 - .../FinancialConnections/Accounts.js | 28 - .../FinancialConnections/Sessions.js | 14 - lib/resources/Identity/VerificationReports.js | 15 - .../Identity/VerificationSessions.js | 31 - lib/resources/InvoiceItems.js | 27 - lib/resources/Invoices.js | 66 -- lib/resources/Issuing/Authorizations.js | 27 - lib/resources/Issuing/Cardholders.js | 23 - lib/resources/Issuing/Cards.js | 23 - lib/resources/Issuing/Disputes.js | 27 - lib/resources/Issuing/Transactions.js | 19 - lib/resources/Mandates.js | 10 - lib/resources/PaymentIntents.js | 52 -- lib/resources/PaymentLinks.js | 28 - lib/resources/PaymentMethods.js | 31 - lib/resources/Payouts.js | 31 - lib/resources/Plans.js | 27 - lib/resources/Prices.js | 28 - lib/resources/Products.js | 32 - lib/resources/PromotionCodes.js | 23 - lib/resources/Quotes.js | 51 -- lib/resources/Radar/EarlyFraudWarnings.js | 15 - lib/resources/Radar/ValueListItems.js | 23 - lib/resources/Radar/ValueLists.js | 27 - lib/resources/Refunds.js | 27 - lib/resources/Reporting/ReportRuns.js | 19 - lib/resources/Reporting/ReportTypes.js | 15 - lib/resources/Reviews.js | 19 - lib/resources/SetupAttempts.js | 11 - lib/resources/SetupIntents.js | 35 - lib/resources/ShippingRates.js | 23 - lib/resources/Sigma/ScheduledQueryRuns.js | 15 - lib/resources/Sources.js | 27 - lib/resources/SubscriptionItems.js | 36 - lib/resources/SubscriptionSchedules.js | 31 - lib/resources/Subscriptions.js | 44 -- lib/resources/TaxCodes.js | 15 - lib/resources/TaxRates.js | 23 - lib/resources/Terminal/Configurations.js | 27 - lib/resources/Terminal/ConnectionTokens.js | 10 - lib/resources/Terminal/Locations.js | 27 - lib/resources/Terminal/Readers.js | 43 -- lib/resources/TestHelpers/Customers.js | 10 - lib/resources/TestHelpers/Issuing/Cards.js | 22 - lib/resources/TestHelpers/Refunds.js | 10 - lib/resources/TestHelpers/Terminal/Readers.js | 10 - lib/resources/TestHelpers/TestClocks.js | 27 - .../TestHelpers/Treasury/InboundTransfers.js | 18 - .../TestHelpers/Treasury/OutboundPayments.js | 18 - .../TestHelpers/Treasury/OutboundTransfers.js | 18 - .../TestHelpers/Treasury/ReceivedCredits.js | 10 - .../TestHelpers/Treasury/ReceivedDebits.js | 10 - lib/resources/Tokens.js | 14 - lib/resources/Topups.js | 27 - lib/resources/Transfers.js | 40 -- lib/resources/Treasury/CreditReversals.js | 19 - lib/resources/Treasury/DebitReversals.js | 19 - lib/resources/Treasury/FinancialAccounts.js | 31 - lib/resources/Treasury/InboundTransfers.js | 23 - lib/resources/Treasury/OutboundPayments.js | 23 - lib/resources/Treasury/OutboundTransfers.js | 23 - lib/resources/Treasury/ReceivedCredits.js | 15 - lib/resources/Treasury/ReceivedDebits.js | 15 - lib/resources/Treasury/TransactionEntries.js | 15 - lib/resources/Treasury/Transactions.js | 15 - lib/resources/WebhookEndpoints.js | 27 - src/resources/Accounts.js | 72 +- src/resources/ApplicationFees.js | 12 +- src/resources/CreditNotes.js | 12 +- src/resources/Customers.js | 116 +-- src/resources/Invoices.js | 12 +- src/resources/Transfers.js | 12 +- .../resources/generated_examples_test.spec.js | 514 +++++++------- types/AccountsResource.d.ts | 559 ++++++++------- types/ApplicationFeesResource.d.ts | 41 +- types/CreditNotesResource.d.ts | 40 +- types/CustomersResource.d.ts | 662 +++++++++--------- types/InvoicesResource.d.ts | 40 +- types/TransfersResource.d.ts | 41 +- 102 files changed, 1073 insertions(+), 3413 deletions(-) delete mode 100644 lib/apiVersion.js delete mode 100644 lib/resources.js delete mode 100644 lib/resources/AccountLinks.js delete mode 100644 lib/resources/Accounts.js delete mode 100644 lib/resources/ApplePayDomains.js delete mode 100644 lib/resources/ApplicationFees.js delete mode 100644 lib/resources/Apps/Secrets.js delete mode 100644 lib/resources/Balance.js delete mode 100644 lib/resources/BalanceTransactions.js delete mode 100644 lib/resources/BillingPortal/Configurations.js delete mode 100644 lib/resources/BillingPortal/Sessions.js delete mode 100644 lib/resources/Charges.js delete mode 100644 lib/resources/Checkout/Sessions.js delete mode 100644 lib/resources/CountrySpecs.js delete mode 100644 lib/resources/Coupons.js delete mode 100644 lib/resources/CreditNotes.js delete mode 100644 lib/resources/Customers.js delete mode 100644 lib/resources/Disputes.js delete mode 100644 lib/resources/EphemeralKeys.js delete mode 100644 lib/resources/Events.js delete mode 100644 lib/resources/ExchangeRates.js delete mode 100644 lib/resources/FileLinks.js delete mode 100644 lib/resources/Files.js delete mode 100644 lib/resources/FinancialConnections/Accounts.js delete mode 100644 lib/resources/FinancialConnections/Sessions.js delete mode 100644 lib/resources/Identity/VerificationReports.js delete mode 100644 lib/resources/Identity/VerificationSessions.js delete mode 100644 lib/resources/InvoiceItems.js delete mode 100644 lib/resources/Invoices.js delete mode 100644 lib/resources/Issuing/Authorizations.js delete mode 100644 lib/resources/Issuing/Cardholders.js delete mode 100644 lib/resources/Issuing/Cards.js delete mode 100644 lib/resources/Issuing/Disputes.js delete mode 100644 lib/resources/Issuing/Transactions.js delete mode 100644 lib/resources/Mandates.js delete mode 100644 lib/resources/PaymentIntents.js delete mode 100644 lib/resources/PaymentLinks.js delete mode 100644 lib/resources/PaymentMethods.js delete mode 100644 lib/resources/Payouts.js delete mode 100644 lib/resources/Plans.js delete mode 100644 lib/resources/Prices.js delete mode 100644 lib/resources/Products.js delete mode 100644 lib/resources/PromotionCodes.js delete mode 100644 lib/resources/Quotes.js delete mode 100644 lib/resources/Radar/EarlyFraudWarnings.js delete mode 100644 lib/resources/Radar/ValueListItems.js delete mode 100644 lib/resources/Radar/ValueLists.js delete mode 100644 lib/resources/Refunds.js delete mode 100644 lib/resources/Reporting/ReportRuns.js delete mode 100644 lib/resources/Reporting/ReportTypes.js delete mode 100644 lib/resources/Reviews.js delete mode 100644 lib/resources/SetupAttempts.js delete mode 100644 lib/resources/SetupIntents.js delete mode 100644 lib/resources/ShippingRates.js delete mode 100644 lib/resources/Sigma/ScheduledQueryRuns.js delete mode 100644 lib/resources/Sources.js delete mode 100644 lib/resources/SubscriptionItems.js delete mode 100644 lib/resources/SubscriptionSchedules.js delete mode 100644 lib/resources/Subscriptions.js delete mode 100644 lib/resources/TaxCodes.js delete mode 100644 lib/resources/TaxRates.js delete mode 100644 lib/resources/Terminal/Configurations.js delete mode 100644 lib/resources/Terminal/ConnectionTokens.js delete mode 100644 lib/resources/Terminal/Locations.js delete mode 100644 lib/resources/Terminal/Readers.js delete mode 100644 lib/resources/TestHelpers/Customers.js delete mode 100644 lib/resources/TestHelpers/Issuing/Cards.js delete mode 100644 lib/resources/TestHelpers/Refunds.js delete mode 100644 lib/resources/TestHelpers/Terminal/Readers.js delete mode 100644 lib/resources/TestHelpers/TestClocks.js delete mode 100644 lib/resources/TestHelpers/Treasury/InboundTransfers.js delete mode 100644 lib/resources/TestHelpers/Treasury/OutboundPayments.js delete mode 100644 lib/resources/TestHelpers/Treasury/OutboundTransfers.js delete mode 100644 lib/resources/TestHelpers/Treasury/ReceivedCredits.js delete mode 100644 lib/resources/TestHelpers/Treasury/ReceivedDebits.js delete mode 100644 lib/resources/Tokens.js delete mode 100644 lib/resources/Topups.js delete mode 100644 lib/resources/Transfers.js delete mode 100644 lib/resources/Treasury/CreditReversals.js delete mode 100644 lib/resources/Treasury/DebitReversals.js delete mode 100644 lib/resources/Treasury/FinancialAccounts.js delete mode 100644 lib/resources/Treasury/InboundTransfers.js delete mode 100644 lib/resources/Treasury/OutboundPayments.js delete mode 100644 lib/resources/Treasury/OutboundTransfers.js delete mode 100644 lib/resources/Treasury/ReceivedCredits.js delete mode 100644 lib/resources/Treasury/ReceivedDebits.js delete mode 100644 lib/resources/Treasury/TransactionEntries.js delete mode 100644 lib/resources/Treasury/Transactions.js delete mode 100644 lib/resources/WebhookEndpoints.js diff --git a/lib/apiVersion.js b/lib/apiVersion.js deleted file mode 100644 index 12993d017c..0000000000 --- a/lib/apiVersion.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -// File generated from our OpenAPI spec -module.exports = { ApiVersion: '2022-11-15' }; diff --git a/lib/resources.js b/lib/resources.js deleted file mode 100644 index 380c3b193d..0000000000 --- a/lib/resources.js +++ /dev/null @@ -1,125 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const resourceNamespace = require('./ResourceNamespace'); -module.exports = { - // Support Accounts for consistency, Account for backwards compatibility - Account: require('./resources/Accounts'), - AccountLinks: require('./resources/AccountLinks'), - Accounts: require('./resources/Accounts'), - ApplePayDomains: require('./resources/ApplePayDomains'), - ApplicationFees: require('./resources/ApplicationFees'), - Balance: require('./resources/Balance'), - BalanceTransactions: require('./resources/BalanceTransactions'), - Charges: require('./resources/Charges'), - CountrySpecs: require('./resources/CountrySpecs'), - Coupons: require('./resources/Coupons'), - CreditNotes: require('./resources/CreditNotes'), - Customers: require('./resources/Customers'), - Disputes: require('./resources/Disputes'), - EphemeralKeys: require('./resources/EphemeralKeys'), - Events: require('./resources/Events'), - ExchangeRates: require('./resources/ExchangeRates'), - FileLinks: require('./resources/FileLinks'), - Files: require('./resources/Files'), - InvoiceItems: require('./resources/InvoiceItems'), - Invoices: require('./resources/Invoices'), - Mandates: require('./resources/Mandates'), - OAuth: require('./resources/OAuth'), - PaymentIntents: require('./resources/PaymentIntents'), - PaymentLinks: require('./resources/PaymentLinks'), - PaymentMethods: require('./resources/PaymentMethods'), - Payouts: require('./resources/Payouts'), - Plans: require('./resources/Plans'), - Prices: require('./resources/Prices'), - Products: require('./resources/Products'), - PromotionCodes: require('./resources/PromotionCodes'), - Quotes: require('./resources/Quotes'), - Refunds: require('./resources/Refunds'), - Reviews: require('./resources/Reviews'), - SetupAttempts: require('./resources/SetupAttempts'), - SetupIntents: require('./resources/SetupIntents'), - ShippingRates: require('./resources/ShippingRates'), - Sources: require('./resources/Sources'), - SubscriptionItems: require('./resources/SubscriptionItems'), - Subscriptions: require('./resources/Subscriptions'), - SubscriptionSchedules: require('./resources/SubscriptionSchedules'), - TaxCodes: require('./resources/TaxCodes'), - TaxRates: require('./resources/TaxRates'), - Tokens: require('./resources/Tokens'), - Topups: require('./resources/Topups'), - Transfers: require('./resources/Transfers'), - WebhookEndpoints: require('./resources/WebhookEndpoints'), - Apps: resourceNamespace('apps', { - Secrets: require('./resources/Apps/Secrets'), - }), - BillingPortal: resourceNamespace('billingPortal', { - Configurations: require('./resources/BillingPortal/Configurations'), - Sessions: require('./resources/BillingPortal/Sessions'), - }), - Checkout: resourceNamespace('checkout', { - Sessions: require('./resources/Checkout/Sessions'), - }), - FinancialConnections: resourceNamespace('financialConnections', { - Accounts: require('./resources/FinancialConnections/Accounts'), - Sessions: require('./resources/FinancialConnections/Sessions'), - }), - Identity: resourceNamespace('identity', { - VerificationReports: require('./resources/Identity/VerificationReports'), - VerificationSessions: require('./resources/Identity/VerificationSessions'), - }), - Issuing: resourceNamespace('issuing', { - Authorizations: require('./resources/Issuing/Authorizations'), - Cardholders: require('./resources/Issuing/Cardholders'), - Cards: require('./resources/Issuing/Cards'), - Disputes: require('./resources/Issuing/Disputes'), - Transactions: require('./resources/Issuing/Transactions'), - }), - Radar: resourceNamespace('radar', { - EarlyFraudWarnings: require('./resources/Radar/EarlyFraudWarnings'), - ValueListItems: require('./resources/Radar/ValueListItems'), - ValueLists: require('./resources/Radar/ValueLists'), - }), - Reporting: resourceNamespace('reporting', { - ReportRuns: require('./resources/Reporting/ReportRuns'), - ReportTypes: require('./resources/Reporting/ReportTypes'), - }), - Sigma: resourceNamespace('sigma', { - ScheduledQueryRuns: require('./resources/Sigma/ScheduledQueryRuns'), - }), - Terminal: resourceNamespace('terminal', { - Configurations: require('./resources/Terminal/Configurations'), - ConnectionTokens: require('./resources/Terminal/ConnectionTokens'), - Locations: require('./resources/Terminal/Locations'), - Readers: require('./resources/Terminal/Readers'), - }), - TestHelpers: resourceNamespace('testHelpers', { - Customers: require('./resources/TestHelpers/Customers'), - Refunds: require('./resources/TestHelpers/Refunds'), - TestClocks: require('./resources/TestHelpers/TestClocks'), - Issuing: resourceNamespace('issuing', { - Cards: require('./resources/TestHelpers/Issuing/Cards'), - }), - Terminal: resourceNamespace('terminal', { - Readers: require('./resources/TestHelpers/Terminal/Readers'), - }), - Treasury: resourceNamespace('treasury', { - InboundTransfers: require('./resources/TestHelpers/Treasury/InboundTransfers'), - OutboundPayments: require('./resources/TestHelpers/Treasury/OutboundPayments'), - OutboundTransfers: require('./resources/TestHelpers/Treasury/OutboundTransfers'), - ReceivedCredits: require('./resources/TestHelpers/Treasury/ReceivedCredits'), - ReceivedDebits: require('./resources/TestHelpers/Treasury/ReceivedDebits'), - }), - }), - Treasury: resourceNamespace('treasury', { - CreditReversals: require('./resources/Treasury/CreditReversals'), - DebitReversals: require('./resources/Treasury/DebitReversals'), - FinancialAccounts: require('./resources/Treasury/FinancialAccounts'), - InboundTransfers: require('./resources/Treasury/InboundTransfers'), - OutboundPayments: require('./resources/Treasury/OutboundPayments'), - OutboundTransfers: require('./resources/Treasury/OutboundTransfers'), - ReceivedCredits: require('./resources/Treasury/ReceivedCredits'), - ReceivedDebits: require('./resources/Treasury/ReceivedDebits'), - TransactionEntries: require('./resources/Treasury/TransactionEntries'), - Transactions: require('./resources/Treasury/Transactions'), - }), -}; diff --git a/lib/resources/AccountLinks.js b/lib/resources/AccountLinks.js deleted file mode 100644 index 4e454771df..0000000000 --- a/lib/resources/AccountLinks.js +++ /dev/null @@ -1,10 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/account_links', - }), -}); diff --git a/lib/resources/Accounts.js b/lib/resources/Accounts.js deleted file mode 100644 index 1be3480640..0000000000 --- a/lib/resources/Accounts.js +++ /dev/null @@ -1,107 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -// Since path can either be `account` or `accounts`, support both through stripeMethod path; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/accounts', - }), - 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 - if (typeof id === 'string') { - return stripeMethod({ - method: 'GET', - fullPath: '/v1/accounts/{id}', - }).apply(this, arguments); - } - else { - if (id === null || id === undefined) { - // Remove id as stripeMethod would complain of unexpected argument - [].shift.apply(arguments); - } - return stripeMethod({ - method: 'GET', - fullPath: '/v1/account', - }).apply(this, arguments); - } - }, - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/accounts/{account}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/accounts', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/accounts/{account}', - }), - reject: stripeMethod({ - method: 'POST', - fullPath: '/v1/accounts/{account}/reject', - }), - retrieveCapability: stripeMethod({ - method: 'GET', - fullPath: '/v1/accounts/{account}/capabilities/{capability}', - }), - updateCapability: stripeMethod({ - method: 'POST', - fullPath: '/v1/accounts/{account}/capabilities/{capability}', - }), - listCapabilities: stripeMethod({ - method: 'GET', - fullPath: '/v1/accounts/{account}/capabilities', - methodType: 'list', - }), - createExternalAccount: stripeMethod({ - method: 'POST', - fullPath: '/v1/accounts/{account}/external_accounts', - }), - retrieveExternalAccount: stripeMethod({ - method: 'GET', - fullPath: '/v1/accounts/{account}/external_accounts/{id}', - }), - updateExternalAccount: stripeMethod({ - method: 'POST', - fullPath: '/v1/accounts/{account}/external_accounts/{id}', - }), - listExternalAccounts: stripeMethod({ - method: 'GET', - fullPath: '/v1/accounts/{account}/external_accounts', - methodType: 'list', - }), - deleteExternalAccount: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/accounts/{account}/external_accounts/{id}', - }), - createLoginLink: stripeMethod({ - method: 'POST', - fullPath: '/v1/accounts/{account}/login_links', - }), - createPerson: stripeMethod({ - method: 'POST', - fullPath: '/v1/accounts/{account}/persons', - }), - retrievePerson: stripeMethod({ - method: 'GET', - fullPath: '/v1/accounts/{account}/persons/{person}', - }), - updatePerson: stripeMethod({ - method: 'POST', - fullPath: '/v1/accounts/{account}/persons/{person}', - }), - listPersons: stripeMethod({ - method: 'GET', - fullPath: '/v1/accounts/{account}/persons', - methodType: 'list', - }), - deletePerson: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/accounts/{account}/persons/{person}', - }), -}); diff --git a/lib/resources/ApplePayDomains.js b/lib/resources/ApplePayDomains.js deleted file mode 100644 index 46fc59ad61..0000000000 --- a/lib/resources/ApplePayDomains.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/apple_pay/domains', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/apple_pay/domains/{domain}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/apple_pay/domains', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/apple_pay/domains/{domain}', - }), -}); diff --git a/lib/resources/ApplicationFees.js b/lib/resources/ApplicationFees.js deleted file mode 100644 index c61a07964e..0000000000 --- a/lib/resources/ApplicationFees.js +++ /dev/null @@ -1,32 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/application_fees/{id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/application_fees', - methodType: 'list', - }), - createRefund: stripeMethod({ - method: 'POST', - fullPath: '/v1/application_fees/{id}/refunds', - }), - retrieveRefund: stripeMethod({ - method: 'GET', - fullPath: '/v1/application_fees/{fee}/refunds/{id}', - }), - updateRefund: stripeMethod({ - method: 'POST', - fullPath: '/v1/application_fees/{fee}/refunds/{id}', - }), - listRefunds: stripeMethod({ - method: 'GET', - fullPath: '/v1/application_fees/{id}/refunds', - methodType: 'list', - }), -}); diff --git a/lib/resources/Apps/Secrets.js b/lib/resources/Apps/Secrets.js deleted file mode 100644 index f94086c14e..0000000000 --- a/lib/resources/Apps/Secrets.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/apps/secrets', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/apps/secrets', - methodType: 'list', - }), - deleteWhere: stripeMethod({ - method: 'POST', - fullPath: '/v1/apps/secrets/delete', - }), - find: stripeMethod({ - method: 'GET', - fullPath: '/v1/apps/secrets/find', - }), -}); diff --git a/lib/resources/Balance.js b/lib/resources/Balance.js deleted file mode 100644 index d1d9b4f30f..0000000000 --- a/lib/resources/Balance.js +++ /dev/null @@ -1,10 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/balance', - }), -}); diff --git a/lib/resources/BalanceTransactions.js b/lib/resources/BalanceTransactions.js deleted file mode 100644 index eb5317a777..0000000000 --- a/lib/resources/BalanceTransactions.js +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/balance_transactions/{id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/balance_transactions', - methodType: 'list', - }), -}); diff --git a/lib/resources/BillingPortal/Configurations.js b/lib/resources/BillingPortal/Configurations.js deleted file mode 100644 index a64e367e19..0000000000 --- a/lib/resources/BillingPortal/Configurations.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/billing_portal/configurations', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/billing_portal/configurations/{configuration}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/billing_portal/configurations/{configuration}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/billing_portal/configurations', - methodType: 'list', - }), -}); diff --git a/lib/resources/BillingPortal/Sessions.js b/lib/resources/BillingPortal/Sessions.js deleted file mode 100644 index 04ce6efafc..0000000000 --- a/lib/resources/BillingPortal/Sessions.js +++ /dev/null @@ -1,10 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/billing_portal/sessions', - }), -}); diff --git a/lib/resources/Charges.js b/lib/resources/Charges.js deleted file mode 100644 index f329f6b36e..0000000000 --- a/lib/resources/Charges.js +++ /dev/null @@ -1,32 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/charges', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/charges/{charge}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/charges/{charge}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/charges', - methodType: 'list', - }), - capture: stripeMethod({ - method: 'POST', - fullPath: '/v1/charges/{charge}/capture', - }), - search: stripeMethod({ - method: 'GET', - fullPath: '/v1/charges/search', - methodType: 'search', - }), -}); diff --git a/lib/resources/Checkout/Sessions.js b/lib/resources/Checkout/Sessions.js deleted file mode 100644 index 40adb4662a..0000000000 --- a/lib/resources/Checkout/Sessions.js +++ /dev/null @@ -1,28 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/checkout/sessions', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/checkout/sessions/{session}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/checkout/sessions', - methodType: 'list', - }), - expire: stripeMethod({ - method: 'POST', - fullPath: '/v1/checkout/sessions/{session}/expire', - }), - listLineItems: stripeMethod({ - method: 'GET', - fullPath: '/v1/checkout/sessions/{session}/line_items', - methodType: 'list', - }), -}); diff --git a/lib/resources/CountrySpecs.js b/lib/resources/CountrySpecs.js deleted file mode 100644 index 8aefedb58f..0000000000 --- a/lib/resources/CountrySpecs.js +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/country_specs/{country}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/country_specs', - methodType: 'list', - }), -}); diff --git a/lib/resources/Coupons.js b/lib/resources/Coupons.js deleted file mode 100644 index 468338f603..0000000000 --- a/lib/resources/Coupons.js +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/coupons', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/coupons/{coupon}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/coupons/{coupon}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/coupons', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/coupons/{coupon}', - }), -}); diff --git a/lib/resources/CreditNotes.js b/lib/resources/CreditNotes.js deleted file mode 100644 index 2b2f42f4c8..0000000000 --- a/lib/resources/CreditNotes.js +++ /dev/null @@ -1,41 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/credit_notes', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/credit_notes/{id}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/credit_notes/{id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/credit_notes', - methodType: 'list', - }), - listPreviewLineItems: stripeMethod({ - method: 'GET', - fullPath: '/v1/credit_notes/preview/lines', - methodType: 'list', - }), - preview: stripeMethod({ - method: 'GET', - fullPath: '/v1/credit_notes/preview', - }), - voidCreditNote: stripeMethod({ - method: 'POST', - fullPath: '/v1/credit_notes/{id}/void', - }), - listLineItems: stripeMethod({ - method: 'GET', - fullPath: '/v1/credit_notes/{credit_note}/lines', - methodType: 'list', - }), -}); diff --git a/lib/resources/Customers.js b/lib/resources/Customers.js deleted file mode 100644 index 5196f84898..0000000000 --- a/lib/resources/Customers.js +++ /dev/null @@ -1,125 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/customers/{customer}', - }), - createFundingInstructions: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}/funding_instructions', - }), - deleteDiscount: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/customers/{customer}/discount', - }), - listPaymentMethods: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/payment_methods', - methodType: 'list', - }), - retrievePaymentMethod: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/payment_methods/{payment_method}', - }), - search: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/search', - methodType: 'search', - }), - retrieveCashBalance: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/cash_balance', - }), - updateCashBalance: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}/cash_balance', - }), - createBalanceTransaction: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}/balance_transactions', - }), - retrieveBalanceTransaction: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/balance_transactions/{transaction}', - }), - updateBalanceTransaction: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}/balance_transactions/{transaction}', - }), - listBalanceTransactions: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/balance_transactions', - methodType: 'list', - }), - retrieveCashBalanceTransaction: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/cash_balance_transactions/{transaction}', - }), - listCashBalanceTransactions: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/cash_balance_transactions', - methodType: 'list', - }), - createSource: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}/sources', - }), - retrieveSource: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/sources/{id}', - }), - updateSource: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}/sources/{id}', - }), - listSources: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/sources', - methodType: 'list', - }), - deleteSource: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/customers/{customer}/sources/{id}', - }), - verifySource: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}/sources/{id}/verify', - }), - createTaxId: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}/tax_ids', - }), - retrieveTaxId: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/tax_ids/{id}', - }), - listTaxIds: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/tax_ids', - methodType: 'list', - }), - deleteTaxId: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/customers/{customer}/tax_ids/{id}', - }), -}); diff --git a/lib/resources/Disputes.js b/lib/resources/Disputes.js deleted file mode 100644 index 849bd4ce68..0000000000 --- a/lib/resources/Disputes.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/disputes/{dispute}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/disputes/{dispute}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/disputes', - methodType: 'list', - }), - close: stripeMethod({ - method: 'POST', - fullPath: '/v1/disputes/{dispute}/close', - }), -}); diff --git a/lib/resources/EphemeralKeys.js b/lib/resources/EphemeralKeys.js deleted file mode 100644 index 4672229799..0000000000 --- a/lib/resources/EphemeralKeys.js +++ /dev/null @@ -1,19 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/ephemeral_keys', - validator: (data, options) => { - if (!options.headers || !options.headers['Stripe-Version']) { - throw new Error('Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node'); - } - }, - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/ephemeral_keys/{key}', - }), -}); diff --git a/lib/resources/Events.js b/lib/resources/Events.js deleted file mode 100644 index b33d17b056..0000000000 --- a/lib/resources/Events.js +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/events/{id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/events', - methodType: 'list', - }), -}); diff --git a/lib/resources/ExchangeRates.js b/lib/resources/ExchangeRates.js deleted file mode 100644 index b1d58339a7..0000000000 --- a/lib/resources/ExchangeRates.js +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/exchange_rates/{rate_id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/exchange_rates', - methodType: 'list', - }), -}); diff --git a/lib/resources/FileLinks.js b/lib/resources/FileLinks.js deleted file mode 100644 index 3d3b0b9281..0000000000 --- a/lib/resources/FileLinks.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/file_links', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/file_links/{link}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/file_links/{link}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/file_links', - methodType: 'list', - }), -}); diff --git a/lib/resources/Files.js b/lib/resources/Files.js deleted file mode 100644 index 4b86ed3daa..0000000000 --- a/lib/resources/Files.js +++ /dev/null @@ -1,25 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const { multipartRequestDataProcessor } = require('../multipart'); -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/files', - headers: { - 'Content-Type': 'multipart/form-data', - }, - host: 'files.stripe.com', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/files/{file}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/files', - methodType: 'list', - }), - requestDataProcessor: multipartRequestDataProcessor, -}); diff --git a/lib/resources/FinancialConnections/Accounts.js b/lib/resources/FinancialConnections/Accounts.js deleted file mode 100644 index edd9ed420a..0000000000 --- a/lib/resources/FinancialConnections/Accounts.js +++ /dev/null @@ -1,28 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/financial_connections/accounts/{account}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/financial_connections/accounts', - methodType: 'list', - }), - disconnect: stripeMethod({ - method: 'POST', - fullPath: '/v1/financial_connections/accounts/{account}/disconnect', - }), - listOwners: stripeMethod({ - method: 'GET', - fullPath: '/v1/financial_connections/accounts/{account}/owners', - methodType: 'list', - }), - refresh: stripeMethod({ - method: 'POST', - fullPath: '/v1/financial_connections/accounts/{account}/refresh', - }), -}); diff --git a/lib/resources/FinancialConnections/Sessions.js b/lib/resources/FinancialConnections/Sessions.js deleted file mode 100644 index 227c39104a..0000000000 --- a/lib/resources/FinancialConnections/Sessions.js +++ /dev/null @@ -1,14 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/financial_connections/sessions', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/financial_connections/sessions/{session}', - }), -}); diff --git a/lib/resources/Identity/VerificationReports.js b/lib/resources/Identity/VerificationReports.js deleted file mode 100644 index 1ceb56339c..0000000000 --- a/lib/resources/Identity/VerificationReports.js +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/identity/verification_reports/{report}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/identity/verification_reports', - methodType: 'list', - }), -}); diff --git a/lib/resources/Identity/VerificationSessions.js b/lib/resources/Identity/VerificationSessions.js deleted file mode 100644 index 4984233d1b..0000000000 --- a/lib/resources/Identity/VerificationSessions.js +++ /dev/null @@ -1,31 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/identity/verification_sessions', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/identity/verification_sessions/{session}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/identity/verification_sessions/{session}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/identity/verification_sessions', - methodType: 'list', - }), - cancel: stripeMethod({ - method: 'POST', - fullPath: '/v1/identity/verification_sessions/{session}/cancel', - }), - redact: stripeMethod({ - method: 'POST', - fullPath: '/v1/identity/verification_sessions/{session}/redact', - }), -}); diff --git a/lib/resources/InvoiceItems.js b/lib/resources/InvoiceItems.js deleted file mode 100644 index cafc142981..0000000000 --- a/lib/resources/InvoiceItems.js +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/invoiceitems', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/invoiceitems/{invoiceitem}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/invoiceitems/{invoiceitem}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/invoiceitems', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/invoiceitems/{invoiceitem}', - }), -}); diff --git a/lib/resources/Invoices.js b/lib/resources/Invoices.js deleted file mode 100644 index 7516508fac..0000000000 --- a/lib/resources/Invoices.js +++ /dev/null @@ -1,66 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/invoices', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/invoices/{invoice}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/invoices/{invoice}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/invoices', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/invoices/{invoice}', - }), - finalizeInvoice: stripeMethod({ - method: 'POST', - fullPath: '/v1/invoices/{invoice}/finalize', - }), - listUpcomingLines: stripeMethod({ - method: 'GET', - fullPath: '/v1/invoices/upcoming/lines', - methodType: 'list', - }), - markUncollectible: stripeMethod({ - method: 'POST', - fullPath: '/v1/invoices/{invoice}/mark_uncollectible', - }), - pay: stripeMethod({ - method: 'POST', - fullPath: '/v1/invoices/{invoice}/pay', - }), - retrieveUpcoming: stripeMethod({ - method: 'GET', - fullPath: '/v1/invoices/upcoming', - }), - search: stripeMethod({ - method: 'GET', - fullPath: '/v1/invoices/search', - methodType: 'search', - }), - sendInvoice: stripeMethod({ - method: 'POST', - fullPath: '/v1/invoices/{invoice}/send', - }), - voidInvoice: stripeMethod({ - method: 'POST', - fullPath: '/v1/invoices/{invoice}/void', - }), - listLineItems: stripeMethod({ - method: 'GET', - fullPath: '/v1/invoices/{invoice}/lines', - methodType: 'list', - }), -}); diff --git a/lib/resources/Issuing/Authorizations.js b/lib/resources/Issuing/Authorizations.js deleted file mode 100644 index 6692720c8f..0000000000 --- a/lib/resources/Issuing/Authorizations.js +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/issuing/authorizations/{authorization}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/issuing/authorizations/{authorization}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/issuing/authorizations', - methodType: 'list', - }), - approve: stripeMethod({ - method: 'POST', - fullPath: '/v1/issuing/authorizations/{authorization}/approve', - }), - decline: stripeMethod({ - method: 'POST', - fullPath: '/v1/issuing/authorizations/{authorization}/decline', - }), -}); diff --git a/lib/resources/Issuing/Cardholders.js b/lib/resources/Issuing/Cardholders.js deleted file mode 100644 index ea37a76d1c..0000000000 --- a/lib/resources/Issuing/Cardholders.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/issuing/cardholders', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/issuing/cardholders/{cardholder}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/issuing/cardholders/{cardholder}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/issuing/cardholders', - methodType: 'list', - }), -}); diff --git a/lib/resources/Issuing/Cards.js b/lib/resources/Issuing/Cards.js deleted file mode 100644 index dd63dae5a9..0000000000 --- a/lib/resources/Issuing/Cards.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/issuing/cards', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/issuing/cards/{card}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/issuing/cards/{card}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/issuing/cards', - methodType: 'list', - }), -}); diff --git a/lib/resources/Issuing/Disputes.js b/lib/resources/Issuing/Disputes.js deleted file mode 100644 index 012f81575f..0000000000 --- a/lib/resources/Issuing/Disputes.js +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/issuing/disputes', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/issuing/disputes/{dispute}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/issuing/disputes/{dispute}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/issuing/disputes', - methodType: 'list', - }), - submit: stripeMethod({ - method: 'POST', - fullPath: '/v1/issuing/disputes/{dispute}/submit', - }), -}); diff --git a/lib/resources/Issuing/Transactions.js b/lib/resources/Issuing/Transactions.js deleted file mode 100644 index c6603cbedb..0000000000 --- a/lib/resources/Issuing/Transactions.js +++ /dev/null @@ -1,19 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/issuing/transactions/{transaction}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/issuing/transactions/{transaction}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/issuing/transactions', - methodType: 'list', - }), -}); diff --git a/lib/resources/Mandates.js b/lib/resources/Mandates.js deleted file mode 100644 index b8d12d70db..0000000000 --- a/lib/resources/Mandates.js +++ /dev/null @@ -1,10 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/mandates/{mandate}', - }), -}); diff --git a/lib/resources/PaymentIntents.js b/lib/resources/PaymentIntents.js deleted file mode 100644 index 4e464c0a31..0000000000 --- a/lib/resources/PaymentIntents.js +++ /dev/null @@ -1,52 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_intents', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/payment_intents/{intent}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_intents/{intent}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/payment_intents', - methodType: 'list', - }), - applyCustomerBalance: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_intents/{intent}/apply_customer_balance', - }), - cancel: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_intents/{intent}/cancel', - }), - capture: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_intents/{intent}/capture', - }), - confirm: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_intents/{intent}/confirm', - }), - incrementAuthorization: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_intents/{intent}/increment_authorization', - }), - search: stripeMethod({ - method: 'GET', - fullPath: '/v1/payment_intents/search', - methodType: 'search', - }), - verifyMicrodeposits: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_intents/{intent}/verify_microdeposits', - }), -}); diff --git a/lib/resources/PaymentLinks.js b/lib/resources/PaymentLinks.js deleted file mode 100644 index e693fc9477..0000000000 --- a/lib/resources/PaymentLinks.js +++ /dev/null @@ -1,28 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_links', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/payment_links/{payment_link}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_links/{payment_link}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/payment_links', - methodType: 'list', - }), - listLineItems: stripeMethod({ - method: 'GET', - fullPath: '/v1/payment_links/{payment_link}/line_items', - methodType: 'list', - }), -}); diff --git a/lib/resources/PaymentMethods.js b/lib/resources/PaymentMethods.js deleted file mode 100644 index 3ce80ec613..0000000000 --- a/lib/resources/PaymentMethods.js +++ /dev/null @@ -1,31 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_methods', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/payment_methods/{payment_method}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_methods/{payment_method}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/payment_methods', - methodType: 'list', - }), - attach: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_methods/{payment_method}/attach', - }), - detach: stripeMethod({ - method: 'POST', - fullPath: '/v1/payment_methods/{payment_method}/detach', - }), -}); diff --git a/lib/resources/Payouts.js b/lib/resources/Payouts.js deleted file mode 100644 index aff8a90ed0..0000000000 --- a/lib/resources/Payouts.js +++ /dev/null @@ -1,31 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/payouts', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/payouts/{payout}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/payouts/{payout}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/payouts', - methodType: 'list', - }), - cancel: stripeMethod({ - method: 'POST', - fullPath: '/v1/payouts/{payout}/cancel', - }), - reverse: stripeMethod({ - method: 'POST', - fullPath: '/v1/payouts/{payout}/reverse', - }), -}); diff --git a/lib/resources/Plans.js b/lib/resources/Plans.js deleted file mode 100644 index 0f96cb98e9..0000000000 --- a/lib/resources/Plans.js +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/plans', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/plans/{plan}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/plans/{plan}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/plans', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/plans/{plan}', - }), -}); diff --git a/lib/resources/Prices.js b/lib/resources/Prices.js deleted file mode 100644 index f9b7cb801d..0000000000 --- a/lib/resources/Prices.js +++ /dev/null @@ -1,28 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/prices', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/prices/{price}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/prices/{price}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/prices', - methodType: 'list', - }), - search: stripeMethod({ - method: 'GET', - fullPath: '/v1/prices/search', - methodType: 'search', - }), -}); diff --git a/lib/resources/Products.js b/lib/resources/Products.js deleted file mode 100644 index f25ddf8daa..0000000000 --- a/lib/resources/Products.js +++ /dev/null @@ -1,32 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/products', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/products/{id}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/products/{id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/products', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/products/{id}', - }), - search: stripeMethod({ - method: 'GET', - fullPath: '/v1/products/search', - methodType: 'search', - }), -}); diff --git a/lib/resources/PromotionCodes.js b/lib/resources/PromotionCodes.js deleted file mode 100644 index de58217d82..0000000000 --- a/lib/resources/PromotionCodes.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/promotion_codes', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/promotion_codes/{promotion_code}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/promotion_codes/{promotion_code}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/promotion_codes', - methodType: 'list', - }), -}); diff --git a/lib/resources/Quotes.js b/lib/resources/Quotes.js deleted file mode 100644 index 8e9a82007d..0000000000 --- a/lib/resources/Quotes.js +++ /dev/null @@ -1,51 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/quotes', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/quotes/{quote}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/quotes/{quote}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/quotes', - methodType: 'list', - }), - accept: stripeMethod({ - method: 'POST', - fullPath: '/v1/quotes/{quote}/accept', - }), - cancel: stripeMethod({ - method: 'POST', - fullPath: '/v1/quotes/{quote}/cancel', - }), - finalizeQuote: stripeMethod({ - method: 'POST', - fullPath: '/v1/quotes/{quote}/finalize', - }), - listComputedUpfrontLineItems: stripeMethod({ - method: 'GET', - fullPath: '/v1/quotes/{quote}/computed_upfront_line_items', - methodType: 'list', - }), - listLineItems: stripeMethod({ - method: 'GET', - fullPath: '/v1/quotes/{quote}/line_items', - methodType: 'list', - }), - pdf: stripeMethod({ - host: 'files.stripe.com', - method: 'GET', - fullPath: '/v1/quotes/{quote}/pdf', - streaming: true, - }), -}); diff --git a/lib/resources/Radar/EarlyFraudWarnings.js b/lib/resources/Radar/EarlyFraudWarnings.js deleted file mode 100644 index dd609bed95..0000000000 --- a/lib/resources/Radar/EarlyFraudWarnings.js +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/radar/early_fraud_warnings/{early_fraud_warning}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/radar/early_fraud_warnings', - methodType: 'list', - }), -}); diff --git a/lib/resources/Radar/ValueListItems.js b/lib/resources/Radar/ValueListItems.js deleted file mode 100644 index 864c7897f4..0000000000 --- a/lib/resources/Radar/ValueListItems.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/radar/value_list_items', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/radar/value_list_items/{item}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/radar/value_list_items', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/radar/value_list_items/{item}', - }), -}); diff --git a/lib/resources/Radar/ValueLists.js b/lib/resources/Radar/ValueLists.js deleted file mode 100644 index 90b8c66eeb..0000000000 --- a/lib/resources/Radar/ValueLists.js +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/radar/value_lists', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/radar/value_lists/{value_list}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/radar/value_lists/{value_list}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/radar/value_lists', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/radar/value_lists/{value_list}', - }), -}); diff --git a/lib/resources/Refunds.js b/lib/resources/Refunds.js deleted file mode 100644 index 095193f9f9..0000000000 --- a/lib/resources/Refunds.js +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/refunds', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/refunds/{refund}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/refunds/{refund}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/refunds', - methodType: 'list', - }), - cancel: stripeMethod({ - method: 'POST', - fullPath: '/v1/refunds/{refund}/cancel', - }), -}); diff --git a/lib/resources/Reporting/ReportRuns.js b/lib/resources/Reporting/ReportRuns.js deleted file mode 100644 index 859e672af2..0000000000 --- a/lib/resources/Reporting/ReportRuns.js +++ /dev/null @@ -1,19 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/reporting/report_runs', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/reporting/report_runs/{report_run}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/reporting/report_runs', - methodType: 'list', - }), -}); diff --git a/lib/resources/Reporting/ReportTypes.js b/lib/resources/Reporting/ReportTypes.js deleted file mode 100644 index 87371048df..0000000000 --- a/lib/resources/Reporting/ReportTypes.js +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/reporting/report_types/{report_type}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/reporting/report_types', - methodType: 'list', - }), -}); diff --git a/lib/resources/Reviews.js b/lib/resources/Reviews.js deleted file mode 100644 index 498fbac1b7..0000000000 --- a/lib/resources/Reviews.js +++ /dev/null @@ -1,19 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/reviews/{review}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/reviews', - methodType: 'list', - }), - approve: stripeMethod({ - method: 'POST', - fullPath: '/v1/reviews/{review}/approve', - }), -}); diff --git a/lib/resources/SetupAttempts.js b/lib/resources/SetupAttempts.js deleted file mode 100644 index a7062e23ea..0000000000 --- a/lib/resources/SetupAttempts.js +++ /dev/null @@ -1,11 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/setup_attempts', - methodType: 'list', - }), -}); diff --git a/lib/resources/SetupIntents.js b/lib/resources/SetupIntents.js deleted file mode 100644 index 57f76595b6..0000000000 --- a/lib/resources/SetupIntents.js +++ /dev/null @@ -1,35 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/setup_intents', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/setup_intents/{intent}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/setup_intents/{intent}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/setup_intents', - methodType: 'list', - }), - cancel: stripeMethod({ - method: 'POST', - fullPath: '/v1/setup_intents/{intent}/cancel', - }), - confirm: stripeMethod({ - method: 'POST', - fullPath: '/v1/setup_intents/{intent}/confirm', - }), - verifyMicrodeposits: stripeMethod({ - method: 'POST', - fullPath: '/v1/setup_intents/{intent}/verify_microdeposits', - }), -}); diff --git a/lib/resources/ShippingRates.js b/lib/resources/ShippingRates.js deleted file mode 100644 index 7a7ebce845..0000000000 --- a/lib/resources/ShippingRates.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/shipping_rates', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/shipping_rates/{shipping_rate_token}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/shipping_rates/{shipping_rate_token}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/shipping_rates', - methodType: 'list', - }), -}); diff --git a/lib/resources/Sigma/ScheduledQueryRuns.js b/lib/resources/Sigma/ScheduledQueryRuns.js deleted file mode 100644 index a20907900e..0000000000 --- a/lib/resources/Sigma/ScheduledQueryRuns.js +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/sigma/scheduled_query_runs/{scheduled_query_run}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/sigma/scheduled_query_runs', - methodType: 'list', - }), -}); diff --git a/lib/resources/Sources.js b/lib/resources/Sources.js deleted file mode 100644 index cdd7efb728..0000000000 --- a/lib/resources/Sources.js +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/sources', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/sources/{source}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/sources/{source}', - }), - listSourceTransactions: stripeMethod({ - method: 'GET', - fullPath: '/v1/sources/{source}/source_transactions', - methodType: 'list', - }), - verify: stripeMethod({ - method: 'POST', - fullPath: '/v1/sources/{source}/verify', - }), -}); diff --git a/lib/resources/SubscriptionItems.js b/lib/resources/SubscriptionItems.js deleted file mode 100644 index 523456507a..0000000000 --- a/lib/resources/SubscriptionItems.js +++ /dev/null @@ -1,36 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/subscription_items', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/subscription_items/{item}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/subscription_items/{item}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/subscription_items', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/subscription_items/{item}', - }), - createUsageRecord: stripeMethod({ - method: 'POST', - fullPath: '/v1/subscription_items/{subscription_item}/usage_records', - }), - listUsageRecordSummaries: stripeMethod({ - method: 'GET', - fullPath: '/v1/subscription_items/{subscription_item}/usage_record_summaries', - methodType: 'list', - }), -}); diff --git a/lib/resources/SubscriptionSchedules.js b/lib/resources/SubscriptionSchedules.js deleted file mode 100644 index 5027db2604..0000000000 --- a/lib/resources/SubscriptionSchedules.js +++ /dev/null @@ -1,31 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/subscription_schedules', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/subscription_schedules/{schedule}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/subscription_schedules/{schedule}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/subscription_schedules', - methodType: 'list', - }), - cancel: stripeMethod({ - method: 'POST', - fullPath: '/v1/subscription_schedules/{schedule}/cancel', - }), - release: stripeMethod({ - method: 'POST', - fullPath: '/v1/subscription_schedules/{schedule}/release', - }), -}); diff --git a/lib/resources/Subscriptions.js b/lib/resources/Subscriptions.js deleted file mode 100644 index bf2572edef..0000000000 --- a/lib/resources/Subscriptions.js +++ /dev/null @@ -1,44 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/subscriptions', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/subscriptions/{subscription_exposed_id}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/subscriptions/{subscription_exposed_id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/subscriptions', - methodType: 'list', - }), - cancel: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/subscriptions/{subscription_exposed_id}', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/subscriptions/{subscription_exposed_id}', - }), - deleteDiscount: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/subscriptions/{subscription_exposed_id}/discount', - }), - resume: stripeMethod({ - method: 'POST', - fullPath: '/v1/subscriptions/{subscription}/resume', - }), - search: stripeMethod({ - method: 'GET', - fullPath: '/v1/subscriptions/search', - methodType: 'search', - }), -}); diff --git a/lib/resources/TaxCodes.js b/lib/resources/TaxCodes.js deleted file mode 100644 index 84b9e9c403..0000000000 --- a/lib/resources/TaxCodes.js +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/tax_codes/{id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/tax_codes', - methodType: 'list', - }), -}); diff --git a/lib/resources/TaxRates.js b/lib/resources/TaxRates.js deleted file mode 100644 index 6222ec54a3..0000000000 --- a/lib/resources/TaxRates.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/tax_rates', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/tax_rates/{tax_rate}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/tax_rates/{tax_rate}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/tax_rates', - methodType: 'list', - }), -}); diff --git a/lib/resources/Terminal/Configurations.js b/lib/resources/Terminal/Configurations.js deleted file mode 100644 index 5b2b48bff2..0000000000 --- a/lib/resources/Terminal/Configurations.js +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/terminal/configurations', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/terminal/configurations/{configuration}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/terminal/configurations/{configuration}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/terminal/configurations', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/terminal/configurations/{configuration}', - }), -}); diff --git a/lib/resources/Terminal/ConnectionTokens.js b/lib/resources/Terminal/ConnectionTokens.js deleted file mode 100644 index 03b0ddef19..0000000000 --- a/lib/resources/Terminal/ConnectionTokens.js +++ /dev/null @@ -1,10 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/terminal/connection_tokens', - }), -}); diff --git a/lib/resources/Terminal/Locations.js b/lib/resources/Terminal/Locations.js deleted file mode 100644 index 9179d077f8..0000000000 --- a/lib/resources/Terminal/Locations.js +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/terminal/locations', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/terminal/locations/{location}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/terminal/locations/{location}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/terminal/locations', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/terminal/locations/{location}', - }), -}); diff --git a/lib/resources/Terminal/Readers.js b/lib/resources/Terminal/Readers.js deleted file mode 100644 index dc5ae95d8e..0000000000 --- a/lib/resources/Terminal/Readers.js +++ /dev/null @@ -1,43 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/terminal/readers', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/terminal/readers/{reader}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/terminal/readers/{reader}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/terminal/readers', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/terminal/readers/{reader}', - }), - cancelAction: stripeMethod({ - method: 'POST', - fullPath: '/v1/terminal/readers/{reader}/cancel_action', - }), - processPaymentIntent: stripeMethod({ - method: 'POST', - fullPath: '/v1/terminal/readers/{reader}/process_payment_intent', - }), - processSetupIntent: stripeMethod({ - method: 'POST', - fullPath: '/v1/terminal/readers/{reader}/process_setup_intent', - }), - setReaderDisplay: stripeMethod({ - method: 'POST', - fullPath: '/v1/terminal/readers/{reader}/set_reader_display', - }), -}); diff --git a/lib/resources/TestHelpers/Customers.js b/lib/resources/TestHelpers/Customers.js deleted file mode 100644 index 16044f0d62..0000000000 --- a/lib/resources/TestHelpers/Customers.js +++ /dev/null @@ -1,10 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - fundCashBalance: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/customers/{customer}/fund_cash_balance', - }), -}); diff --git a/lib/resources/TestHelpers/Issuing/Cards.js b/lib/resources/TestHelpers/Issuing/Cards.js deleted file mode 100644 index 6da5bca5bb..0000000000 --- a/lib/resources/TestHelpers/Issuing/Cards.js +++ /dev/null @@ -1,22 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - deliverCard: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/issuing/cards/{card}/shipping/deliver', - }), - failCard: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/issuing/cards/{card}/shipping/fail', - }), - returnCard: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/issuing/cards/{card}/shipping/return', - }), - shipCard: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/issuing/cards/{card}/shipping/ship', - }), -}); diff --git a/lib/resources/TestHelpers/Refunds.js b/lib/resources/TestHelpers/Refunds.js deleted file mode 100644 index 79e16e8ae9..0000000000 --- a/lib/resources/TestHelpers/Refunds.js +++ /dev/null @@ -1,10 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - expire: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/refunds/{refund}/expire', - }), -}); diff --git a/lib/resources/TestHelpers/Terminal/Readers.js b/lib/resources/TestHelpers/Terminal/Readers.js deleted file mode 100644 index 5db3ce2271..0000000000 --- a/lib/resources/TestHelpers/Terminal/Readers.js +++ /dev/null @@ -1,10 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - presentPaymentMethod: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/terminal/readers/{reader}/present_payment_method', - }), -}); diff --git a/lib/resources/TestHelpers/TestClocks.js b/lib/resources/TestHelpers/TestClocks.js deleted file mode 100644 index 0fe10bb858..0000000000 --- a/lib/resources/TestHelpers/TestClocks.js +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/test_clocks', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/test_helpers/test_clocks/{test_clock}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/test_helpers/test_clocks', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/test_helpers/test_clocks/{test_clock}', - }), - advance: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/test_clocks/{test_clock}/advance', - }), -}); diff --git a/lib/resources/TestHelpers/Treasury/InboundTransfers.js b/lib/resources/TestHelpers/Treasury/InboundTransfers.js deleted file mode 100644 index 8778a49aef..0000000000 --- a/lib/resources/TestHelpers/Treasury/InboundTransfers.js +++ /dev/null @@ -1,18 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - fail: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/treasury/inbound_transfers/{id}/fail', - }), - returnInboundTransfer: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/treasury/inbound_transfers/{id}/return', - }), - succeed: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/treasury/inbound_transfers/{id}/succeed', - }), -}); diff --git a/lib/resources/TestHelpers/Treasury/OutboundPayments.js b/lib/resources/TestHelpers/Treasury/OutboundPayments.js deleted file mode 100644 index b5f9d52b1c..0000000000 --- a/lib/resources/TestHelpers/Treasury/OutboundPayments.js +++ /dev/null @@ -1,18 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - fail: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/treasury/outbound_payments/{id}/fail', - }), - post: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/treasury/outbound_payments/{id}/post', - }), - returnOutboundPayment: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/treasury/outbound_payments/{id}/return', - }), -}); diff --git a/lib/resources/TestHelpers/Treasury/OutboundTransfers.js b/lib/resources/TestHelpers/Treasury/OutboundTransfers.js deleted file mode 100644 index f10e448dfe..0000000000 --- a/lib/resources/TestHelpers/Treasury/OutboundTransfers.js +++ /dev/null @@ -1,18 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - fail: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail', - }), - post: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post', - }), - returnOutboundTransfer: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return', - }), -}); diff --git a/lib/resources/TestHelpers/Treasury/ReceivedCredits.js b/lib/resources/TestHelpers/Treasury/ReceivedCredits.js deleted file mode 100644 index 820e611842..0000000000 --- a/lib/resources/TestHelpers/Treasury/ReceivedCredits.js +++ /dev/null @@ -1,10 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/treasury/received_credits', - }), -}); diff --git a/lib/resources/TestHelpers/Treasury/ReceivedDebits.js b/lib/resources/TestHelpers/Treasury/ReceivedDebits.js deleted file mode 100644 index f6fbc7d5df..0000000000 --- a/lib/resources/TestHelpers/Treasury/ReceivedDebits.js +++ /dev/null @@ -1,10 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/test_helpers/treasury/received_debits', - }), -}); diff --git a/lib/resources/Tokens.js b/lib/resources/Tokens.js deleted file mode 100644 index a2e355d5ad..0000000000 --- a/lib/resources/Tokens.js +++ /dev/null @@ -1,14 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/tokens', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/tokens/{token}', - }), -}); diff --git a/lib/resources/Topups.js b/lib/resources/Topups.js deleted file mode 100644 index 7bcf65713e..0000000000 --- a/lib/resources/Topups.js +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/topups', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/topups/{topup}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/topups/{topup}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/topups', - methodType: 'list', - }), - cancel: stripeMethod({ - method: 'POST', - fullPath: '/v1/topups/{topup}/cancel', - }), -}); diff --git a/lib/resources/Transfers.js b/lib/resources/Transfers.js deleted file mode 100644 index 6fb574d6f2..0000000000 --- a/lib/resources/Transfers.js +++ /dev/null @@ -1,40 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/transfers', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/transfers/{transfer}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/transfers/{transfer}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/transfers', - methodType: 'list', - }), - createReversal: stripeMethod({ - method: 'POST', - fullPath: '/v1/transfers/{id}/reversals', - }), - retrieveReversal: stripeMethod({ - method: 'GET', - fullPath: '/v1/transfers/{transfer}/reversals/{id}', - }), - updateReversal: stripeMethod({ - method: 'POST', - fullPath: '/v1/transfers/{transfer}/reversals/{id}', - }), - listReversals: stripeMethod({ - method: 'GET', - fullPath: '/v1/transfers/{id}/reversals', - methodType: 'list', - }), -}); diff --git a/lib/resources/Treasury/CreditReversals.js b/lib/resources/Treasury/CreditReversals.js deleted file mode 100644 index 95d6e2118e..0000000000 --- a/lib/resources/Treasury/CreditReversals.js +++ /dev/null @@ -1,19 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/treasury/credit_reversals', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/credit_reversals/{credit_reversal}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/credit_reversals', - methodType: 'list', - }), -}); diff --git a/lib/resources/Treasury/DebitReversals.js b/lib/resources/Treasury/DebitReversals.js deleted file mode 100644 index 0f53944fcb..0000000000 --- a/lib/resources/Treasury/DebitReversals.js +++ /dev/null @@ -1,19 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/treasury/debit_reversals', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/debit_reversals/{debit_reversal}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/debit_reversals', - methodType: 'list', - }), -}); diff --git a/lib/resources/Treasury/FinancialAccounts.js b/lib/resources/Treasury/FinancialAccounts.js deleted file mode 100644 index 5f3d0dd820..0000000000 --- a/lib/resources/Treasury/FinancialAccounts.js +++ /dev/null @@ -1,31 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/treasury/financial_accounts', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/financial_accounts/{financial_account}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/treasury/financial_accounts/{financial_account}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/financial_accounts', - methodType: 'list', - }), - retrieveFeatures: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/financial_accounts/{financial_account}/features', - }), - updateFeatures: stripeMethod({ - method: 'POST', - fullPath: '/v1/treasury/financial_accounts/{financial_account}/features', - }), -}); diff --git a/lib/resources/Treasury/InboundTransfers.js b/lib/resources/Treasury/InboundTransfers.js deleted file mode 100644 index 52caf10fcd..0000000000 --- a/lib/resources/Treasury/InboundTransfers.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/treasury/inbound_transfers', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/inbound_transfers/{id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/inbound_transfers', - methodType: 'list', - }), - cancel: stripeMethod({ - method: 'POST', - fullPath: '/v1/treasury/inbound_transfers/{inbound_transfer}/cancel', - }), -}); diff --git a/lib/resources/Treasury/OutboundPayments.js b/lib/resources/Treasury/OutboundPayments.js deleted file mode 100644 index d6d0225cd3..0000000000 --- a/lib/resources/Treasury/OutboundPayments.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/treasury/outbound_payments', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/outbound_payments/{id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/outbound_payments', - methodType: 'list', - }), - cancel: stripeMethod({ - method: 'POST', - fullPath: '/v1/treasury/outbound_payments/{id}/cancel', - }), -}); diff --git a/lib/resources/Treasury/OutboundTransfers.js b/lib/resources/Treasury/OutboundTransfers.js deleted file mode 100644 index fc9ca46ac7..0000000000 --- a/lib/resources/Treasury/OutboundTransfers.js +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/treasury/outbound_transfers', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/outbound_transfers/{outbound_transfer}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/outbound_transfers', - methodType: 'list', - }), - cancel: stripeMethod({ - method: 'POST', - fullPath: '/v1/treasury/outbound_transfers/{outbound_transfer}/cancel', - }), -}); diff --git a/lib/resources/Treasury/ReceivedCredits.js b/lib/resources/Treasury/ReceivedCredits.js deleted file mode 100644 index 533398cefd..0000000000 --- a/lib/resources/Treasury/ReceivedCredits.js +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/received_credits/{id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/received_credits', - methodType: 'list', - }), -}); diff --git a/lib/resources/Treasury/ReceivedDebits.js b/lib/resources/Treasury/ReceivedDebits.js deleted file mode 100644 index f4de1b786d..0000000000 --- a/lib/resources/Treasury/ReceivedDebits.js +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/received_debits/{id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/received_debits', - methodType: 'list', - }), -}); diff --git a/lib/resources/Treasury/TransactionEntries.js b/lib/resources/Treasury/TransactionEntries.js deleted file mode 100644 index f899ea919b..0000000000 --- a/lib/resources/Treasury/TransactionEntries.js +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/transaction_entries/{id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/transaction_entries', - methodType: 'list', - }), -}); diff --git a/lib/resources/Treasury/Transactions.js b/lib/resources/Treasury/Transactions.js deleted file mode 100644 index d8c0b0aef9..0000000000 --- a/lib/resources/Treasury/Transactions.js +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/transactions/{id}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/treasury/transactions', - methodType: 'list', - }), -}); diff --git a/lib/resources/WebhookEndpoints.js b/lib/resources/WebhookEndpoints.js deleted file mode 100644 index 72c257d6f2..0000000000 --- a/lib/resources/WebhookEndpoints.js +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -'use strict'; -const StripeResource = require('../StripeResource'); -const stripeMethod = StripeResource.method; -module.exports = StripeResource.extend({ - create: stripeMethod({ - method: 'POST', - fullPath: '/v1/webhook_endpoints', - }), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/webhook_endpoints/{webhook_endpoint}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/webhook_endpoints/{webhook_endpoint}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/webhook_endpoints', - methodType: 'list', - }), - del: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/webhook_endpoints/{webhook_endpoint}', - }), -}); diff --git a/src/resources/Accounts.js b/src/resources/Accounts.js index 9956629e30..e31178aefd 100644 --- a/src/resources/Accounts.js +++ b/src/resources/Accounts.js @@ -48,19 +48,29 @@ module.exports = StripeResource.extend({ fullPath: '/v1/accounts/{account}', }), - reject: stripeMethod({ + createExternalAccount: stripeMethod({ method: 'POST', - fullPath: '/v1/accounts/{account}/reject', + fullPath: '/v1/accounts/{account}/external_accounts', }), - retrieveCapability: stripeMethod({ - method: 'GET', - fullPath: '/v1/accounts/{account}/capabilities/{capability}', + createLoginLink: stripeMethod({ + method: 'POST', + fullPath: '/v1/accounts/{account}/login_links', }), - updateCapability: stripeMethod({ + createPerson: stripeMethod({ method: 'POST', - fullPath: '/v1/accounts/{account}/capabilities/{capability}', + fullPath: '/v1/accounts/{account}/persons', + }), + + deleteExternalAccount: stripeMethod({ + method: 'DELETE', + fullPath: '/v1/accounts/{account}/external_accounts/{id}', + }), + + deletePerson: stripeMethod({ + method: 'DELETE', + fullPath: '/v1/accounts/{account}/persons/{person}', }), listCapabilities: stripeMethod({ @@ -69,60 +79,50 @@ module.exports = StripeResource.extend({ methodType: 'list', }), - createExternalAccount: stripeMethod({ - method: 'POST', + listExternalAccounts: stripeMethod({ + method: 'GET', fullPath: '/v1/accounts/{account}/external_accounts', + methodType: 'list', }), - retrieveExternalAccount: stripeMethod({ + listPersons: stripeMethod({ method: 'GET', - fullPath: '/v1/accounts/{account}/external_accounts/{id}', + fullPath: '/v1/accounts/{account}/persons', + methodType: 'list', }), - updateExternalAccount: stripeMethod({ + reject: stripeMethod({ method: 'POST', - fullPath: '/v1/accounts/{account}/external_accounts/{id}', + fullPath: '/v1/accounts/{account}/reject', }), - listExternalAccounts: stripeMethod({ + retrieveCapability: stripeMethod({ method: 'GET', - fullPath: '/v1/accounts/{account}/external_accounts', - methodType: 'list', + fullPath: '/v1/accounts/{account}/capabilities/{capability}', }), - deleteExternalAccount: stripeMethod({ - method: 'DELETE', + retrieveExternalAccount: stripeMethod({ + method: 'GET', fullPath: '/v1/accounts/{account}/external_accounts/{id}', }), - createLoginLink: stripeMethod({ - method: 'POST', - fullPath: '/v1/accounts/{account}/login_links', - }), - - createPerson: stripeMethod({ - method: 'POST', - fullPath: '/v1/accounts/{account}/persons', - }), - retrievePerson: stripeMethod({ method: 'GET', fullPath: '/v1/accounts/{account}/persons/{person}', }), - updatePerson: stripeMethod({ + updateCapability: stripeMethod({ method: 'POST', - fullPath: '/v1/accounts/{account}/persons/{person}', + fullPath: '/v1/accounts/{account}/capabilities/{capability}', }), - listPersons: stripeMethod({ - method: 'GET', - fullPath: '/v1/accounts/{account}/persons', - methodType: 'list', + updateExternalAccount: stripeMethod({ + method: 'POST', + fullPath: '/v1/accounts/{account}/external_accounts/{id}', }), - deletePerson: stripeMethod({ - method: 'DELETE', + updatePerson: stripeMethod({ + method: 'POST', fullPath: '/v1/accounts/{account}/persons/{person}', }), }); diff --git a/src/resources/ApplicationFees.js b/src/resources/ApplicationFees.js index 21affd640b..919cc718e0 100644 --- a/src/resources/ApplicationFees.js +++ b/src/resources/ApplicationFees.js @@ -22,6 +22,12 @@ module.exports = StripeResource.extend({ fullPath: '/v1/application_fees/{id}/refunds', }), + listRefunds: stripeMethod({ + method: 'GET', + fullPath: '/v1/application_fees/{id}/refunds', + methodType: 'list', + }), + retrieveRefund: stripeMethod({ method: 'GET', fullPath: '/v1/application_fees/{fee}/refunds/{id}', @@ -31,10 +37,4 @@ module.exports = StripeResource.extend({ method: 'POST', fullPath: '/v1/application_fees/{fee}/refunds/{id}', }), - - listRefunds: stripeMethod({ - method: 'GET', - fullPath: '/v1/application_fees/{id}/refunds', - methodType: 'list', - }), }); diff --git a/src/resources/CreditNotes.js b/src/resources/CreditNotes.js index eda7d9e29d..70340b08f9 100644 --- a/src/resources/CreditNotes.js +++ b/src/resources/CreditNotes.js @@ -27,6 +27,12 @@ module.exports = StripeResource.extend({ methodType: 'list', }), + listLineItems: stripeMethod({ + method: 'GET', + fullPath: '/v1/credit_notes/{credit_note}/lines', + methodType: 'list', + }), + listPreviewLineItems: stripeMethod({ method: 'GET', fullPath: '/v1/credit_notes/preview/lines', @@ -42,10 +48,4 @@ module.exports = StripeResource.extend({ method: 'POST', fullPath: '/v1/credit_notes/{id}/void', }), - - listLineItems: stripeMethod({ - method: 'GET', - fullPath: '/v1/credit_notes/{credit_note}/lines', - methodType: 'list', - }), }); diff --git a/src/resources/Customers.js b/src/resources/Customers.js index 234e5573ba..f44166eff1 100644 --- a/src/resources/Customers.js +++ b/src/resources/Customers.js @@ -37,41 +37,69 @@ module.exports = StripeResource.extend({ fullPath: '/v1/customers/{customer}/funding_instructions', }), + createBalanceTransaction: stripeMethod({ + method: 'POST', + fullPath: '/v1/customers/{customer}/balance_transactions', + }), + + createSource: stripeMethod({ + method: 'POST', + fullPath: '/v1/customers/{customer}/sources', + }), + + createTaxId: stripeMethod({ + method: 'POST', + fullPath: '/v1/customers/{customer}/tax_ids', + }), + deleteDiscount: stripeMethod({ method: 'DELETE', fullPath: '/v1/customers/{customer}/discount', }), + deleteSource: stripeMethod({ + method: 'DELETE', + fullPath: '/v1/customers/{customer}/sources/{id}', + }), + + deleteTaxId: stripeMethod({ + method: 'DELETE', + fullPath: '/v1/customers/{customer}/tax_ids/{id}', + }), + listPaymentMethods: stripeMethod({ method: 'GET', fullPath: '/v1/customers/{customer}/payment_methods', methodType: 'list', }), - retrievePaymentMethod: stripeMethod({ + listBalanceTransactions: stripeMethod({ method: 'GET', - fullPath: '/v1/customers/{customer}/payment_methods/{payment_method}', + fullPath: '/v1/customers/{customer}/balance_transactions', + methodType: 'list', }), - search: stripeMethod({ + listCashBalanceTransactions: stripeMethod({ method: 'GET', - fullPath: '/v1/customers/search', - methodType: 'search', + fullPath: '/v1/customers/{customer}/cash_balance_transactions', + methodType: 'list', }), - retrieveCashBalance: stripeMethod({ + listSources: stripeMethod({ method: 'GET', - fullPath: '/v1/customers/{customer}/cash_balance', + fullPath: '/v1/customers/{customer}/sources', + methodType: 'list', }), - updateCashBalance: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}/cash_balance', + listTaxIds: stripeMethod({ + method: 'GET', + fullPath: '/v1/customers/{customer}/tax_ids', + methodType: 'list', }), - createBalanceTransaction: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}/balance_transactions', + retrievePaymentMethod: stripeMethod({ + method: 'GET', + fullPath: '/v1/customers/{customer}/payment_methods/{payment_method}', }), retrieveBalanceTransaction: stripeMethod({ @@ -79,15 +107,9 @@ module.exports = StripeResource.extend({ fullPath: '/v1/customers/{customer}/balance_transactions/{transaction}', }), - updateBalanceTransaction: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}/balance_transactions/{transaction}', - }), - - listBalanceTransactions: stripeMethod({ + retrieveCashBalance: stripeMethod({ method: 'GET', - fullPath: '/v1/customers/{customer}/balance_transactions', - methodType: 'list', + fullPath: '/v1/customers/{customer}/cash_balance', }), retrieveCashBalanceTransaction: stripeMethod({ @@ -96,35 +118,34 @@ module.exports = StripeResource.extend({ '/v1/customers/{customer}/cash_balance_transactions/{transaction}', }), - listCashBalanceTransactions: stripeMethod({ + retrieveSource: stripeMethod({ method: 'GET', - fullPath: '/v1/customers/{customer}/cash_balance_transactions', - methodType: 'list', + fullPath: '/v1/customers/{customer}/sources/{id}', }), - createSource: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}/sources', + retrieveTaxId: stripeMethod({ + method: 'GET', + fullPath: '/v1/customers/{customer}/tax_ids/{id}', }), - retrieveSource: stripeMethod({ + search: stripeMethod({ method: 'GET', - fullPath: '/v1/customers/{customer}/sources/{id}', + fullPath: '/v1/customers/search', + methodType: 'search', }), - updateSource: stripeMethod({ + updateBalanceTransaction: stripeMethod({ method: 'POST', - fullPath: '/v1/customers/{customer}/sources/{id}', + fullPath: '/v1/customers/{customer}/balance_transactions/{transaction}', }), - listSources: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/sources', - methodType: 'list', + updateCashBalance: stripeMethod({ + method: 'POST', + fullPath: '/v1/customers/{customer}/cash_balance', }), - deleteSource: stripeMethod({ - method: 'DELETE', + updateSource: stripeMethod({ + method: 'POST', fullPath: '/v1/customers/{customer}/sources/{id}', }), @@ -132,25 +153,4 @@ module.exports = StripeResource.extend({ method: 'POST', fullPath: '/v1/customers/{customer}/sources/{id}/verify', }), - - createTaxId: stripeMethod({ - method: 'POST', - fullPath: '/v1/customers/{customer}/tax_ids', - }), - - retrieveTaxId: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/tax_ids/{id}', - }), - - listTaxIds: stripeMethod({ - method: 'GET', - fullPath: '/v1/customers/{customer}/tax_ids', - methodType: 'list', - }), - - deleteTaxId: stripeMethod({ - method: 'DELETE', - fullPath: '/v1/customers/{customer}/tax_ids/{id}', - }), }); diff --git a/src/resources/Invoices.js b/src/resources/Invoices.js index 4e1866f0ac..85b3fc5812 100644 --- a/src/resources/Invoices.js +++ b/src/resources/Invoices.js @@ -37,6 +37,12 @@ module.exports = StripeResource.extend({ fullPath: '/v1/invoices/{invoice}/finalize', }), + listLineItems: stripeMethod({ + method: 'GET', + fullPath: '/v1/invoices/{invoice}/lines', + methodType: 'list', + }), + listUpcomingLines: stripeMethod({ method: 'GET', fullPath: '/v1/invoices/upcoming/lines', @@ -73,10 +79,4 @@ module.exports = StripeResource.extend({ method: 'POST', fullPath: '/v1/invoices/{invoice}/void', }), - - listLineItems: stripeMethod({ - method: 'GET', - fullPath: '/v1/invoices/{invoice}/lines', - methodType: 'list', - }), }); diff --git a/src/resources/Transfers.js b/src/resources/Transfers.js index 743c887335..5a36025701 100644 --- a/src/resources/Transfers.js +++ b/src/resources/Transfers.js @@ -32,6 +32,12 @@ module.exports = StripeResource.extend({ fullPath: '/v1/transfers/{id}/reversals', }), + listReversals: stripeMethod({ + method: 'GET', + fullPath: '/v1/transfers/{id}/reversals', + methodType: 'list', + }), + retrieveReversal: stripeMethod({ method: 'GET', fullPath: '/v1/transfers/{transfer}/reversals/{id}', @@ -41,10 +47,4 @@ module.exports = StripeResource.extend({ method: 'POST', fullPath: '/v1/transfers/{transfer}/reversals/{id}', }), - - listReversals: stripeMethod({ - method: 'GET', - fullPath: '/v1/transfers/{id}/reversals', - methodType: 'list', - }), }); diff --git a/test/resources/generated_examples_test.spec.js b/test/resources/generated_examples_test.spec.js index a412b91444..5c25f0ff8e 100644 --- a/test/resources/generated_examples_test.spec.js +++ b/test/resources/generated_examples_test.spec.js @@ -111,7 +111,7 @@ describe('Checkout.Sessions', function() { }); }); -describe('CashBalance', function() { +describe('Customers', function() { it('retrieveCashBalance method', async function() { const cashBalance = await stripe.customers.retrieveCashBalance('cus_123'); expect(cashBalance).not.to.be.null; @@ -123,9 +123,7 @@ describe('CashBalance', function() { }); expect(cashBalance).not.to.be.null; }); -}); -describe('Customers', function() { it('createFundingInstructions method', async function() { const fundingInstructions = await stripe.customers.createFundingInstructions( 'cus_123', @@ -149,6 +147,13 @@ describe('Customers', function() { expect(paymentMethods).not.to.be.null; }); + it('updateSource method', async function() { + const card = await stripe.customers.updateSource('cus_123', 'card_123', { + account_holder_name: 'Kamil', + }); + expect(card).not.to.be.null; + }); + it('list method', async function() { const customers = await stripe.customers.list({limit: 3}); expect(customers).not.to.be.null; @@ -183,6 +188,39 @@ describe('Customers', function() { expect(customer).not.to.be.null; }); + it('listBalanceTransactions method', async function() { + const customerBalanceTransactions = await stripe.customers.listBalanceTransactions( + 'cus_xxxxxxxxxxxxx', + {limit: 3} + ); + expect(customerBalanceTransactions).not.to.be.null; + }); + + it('createBalanceTransaction method', async function() { + const customerBalanceTransaction = await stripe.customers.createBalanceTransaction( + 'cus_xxxxxxxxxxxxx', + {amount: -500, currency: 'usd'} + ); + expect(customerBalanceTransaction).not.to.be.null; + }); + + it('retrieveBalanceTransaction method', async function() { + const customerBalanceTransaction = await stripe.customers.retrieveBalanceTransaction( + 'cus_xxxxxxxxxxxxx', + 'cbtxn_xxxxxxxxxxxxx' + ); + expect(customerBalanceTransaction).not.to.be.null; + }); + + it('updateBalanceTransaction method', async function() { + const customerBalanceTransaction = await stripe.customers.updateBalanceTransaction( + 'cus_xxxxxxxxxxxxx', + 'cbtxn_xxxxxxxxxxxxx', + {metadata: {order_id: '6735'}} + ); + expect(customerBalanceTransaction).not.to.be.null; + }); + it('listPaymentMethods method', async function() { const paymentMethods = await stripe.customers.listPaymentMethods( 'cus_xxxxxxxxxxxxx', @@ -191,6 +229,128 @@ describe('Customers', function() { expect(paymentMethods).not.to.be.null; }); + it('listSources method', async function() { + const paymentSource = await stripe.customers.listSources( + 'cus_xxxxxxxxxxxxx', + {object: 'bank_account', limit: 3} + ); + expect(paymentSource).not.to.be.null; + }); + + it('listSources method', async function() { + const paymentSource = await stripe.customers.listSources( + 'cus_xxxxxxxxxxxxx', + {object: 'card', limit: 3} + ); + expect(paymentSource).not.to.be.null; + }); + + it('createSource method', async function() { + const paymentSource = await stripe.customers.createSource( + 'cus_xxxxxxxxxxxxx', + {source: 'btok_xxxxxxxxxxxxx'} + ); + expect(paymentSource).not.to.be.null; + }); + + it('createSource method', async function() { + const paymentSource = await stripe.customers.createSource( + 'cus_xxxxxxxxxxxxx', + {source: 'tok_xxxx'} + ); + expect(paymentSource).not.to.be.null; + }); + + it('deleteSource method', async function() { + const paymentSource = await stripe.customers.deleteSource( + 'cus_xxxxxxxxxxxxx', + 'ba_xxxxxxxxxxxxx' + ); + expect(paymentSource).not.to.be.null; + }); + + it('deleteSource method', async function() { + const paymentSource = await stripe.customers.deleteSource( + 'cus_xxxxxxxxxxxxx', + 'card_xxxxxxxxxxxxx' + ); + expect(paymentSource).not.to.be.null; + }); + + it('retrieveSource method', async function() { + const paymentSource = await stripe.customers.retrieveSource( + 'cus_xxxxxxxxxxxxx', + 'ba_xxxxxxxxxxxxx' + ); + expect(paymentSource).not.to.be.null; + }); + + it('retrieveSource method', async function() { + const paymentSource = await stripe.customers.retrieveSource( + 'cus_xxxxxxxxxxxxx', + 'card_xxxxxxxxxxxxx' + ); + expect(paymentSource).not.to.be.null; + }); + + it('updateSource method', async function() { + const card = await stripe.customers.updateSource( + 'cus_xxxxxxxxxxxxx', + 'ba_xxxxxxxxxxxxx', + {metadata: {order_id: '6735'}} + ); + expect(card).not.to.be.null; + }); + + it('updateSource method', async function() { + const card = await stripe.customers.updateSource( + 'cus_xxxxxxxxxxxxx', + 'card_xxxxxxxxxxxxx', + {name: 'Jenny Rosen'} + ); + expect(card).not.to.be.null; + }); + + it('verifySource method', async function() { + const bankAccount = await stripe.customers.verifySource( + 'cus_xxxxxxxxxxxxx', + 'ba_xxxxxxxxxxxxx', + {amounts: [32, 45]} + ); + expect(bankAccount).not.to.be.null; + }); + + it('listTaxIds method', async function() { + const taxIds = await stripe.customers.listTaxIds('cus_xxxxxxxxxxxxx', { + limit: 3, + }); + expect(taxIds).not.to.be.null; + }); + + it('createTaxId method', async function() { + const taxId = await stripe.customers.createTaxId('cus_xxxxxxxxxxxxx', { + type: 'eu_vat', + value: 'DE123456789', + }); + expect(taxId).not.to.be.null; + }); + + it('deleteTaxId method', async function() { + const deleted = await stripe.customers.deleteTaxId( + 'cus_xxxxxxxxxxxxx', + 'txi_xxxxxxxxxxxxx' + ); + expect(deleted).not.to.be.null; + }); + + it('retrieveTaxId method', async function() { + const taxId = await stripe.customers.retrieveTaxId( + 'cus_xxxxxxxxxxxxx', + 'txi_xxxxxxxxxxxxx' + ); + expect(taxId).not.to.be.null; + }); + it('search method', async function() { const customers = await stripe.customers.search({ query: "name:'fakename' AND metadata['foo']:'bar'", @@ -1027,9 +1187,7 @@ describe('Accounts', function() { }); expect(account).not.to.be.null; }); -}); -describe('Capabilities', function() { it('listCapabilities method', async function() { const capabilities = await stripe.accounts.listCapabilities( 'acct_xxxxxxxxxxxxx' @@ -1053,9 +1211,7 @@ describe('Capabilities', function() { ); expect(capability).not.to.be.null; }); -}); -describe('ExternalAccounts', function() { it('listExternalAccounts method', async function() { const externalAccount = await stripe.accounts.listExternalAccounts( 'acct_xxxxxxxxxxxxx', @@ -1129,118 +1285,14 @@ describe('ExternalAccounts', function() { ); expect(externalAccount).not.to.be.null; }); -}); - -describe('CustomerSources', function() { - it('updateSource method', async function() { - const card = await stripe.customers.updateSource('cus_123', 'card_123', { - account_holder_name: 'Kamil', - }); - expect(card).not.to.be.null; - }); - - it('listSources method', async function() { - const paymentSource = await stripe.customers.listSources( - 'cus_xxxxxxxxxxxxx', - {object: 'bank_account', limit: 3} - ); - expect(paymentSource).not.to.be.null; - }); - - it('listSources method', async function() { - const paymentSource = await stripe.customers.listSources( - 'cus_xxxxxxxxxxxxx', - {object: 'card', limit: 3} - ); - expect(paymentSource).not.to.be.null; - }); - - it('createSource method', async function() { - const paymentSource = await stripe.customers.createSource( - 'cus_xxxxxxxxxxxxx', - {source: 'btok_xxxxxxxxxxxxx'} - ); - expect(paymentSource).not.to.be.null; - }); - - it('createSource method', async function() { - const paymentSource = await stripe.customers.createSource( - 'cus_xxxxxxxxxxxxx', - {source: 'tok_xxxx'} - ); - expect(paymentSource).not.to.be.null; - }); - - it('deleteSource method', async function() { - const paymentSource = await stripe.customers.deleteSource( - 'cus_xxxxxxxxxxxxx', - 'ba_xxxxxxxxxxxxx' - ); - expect(paymentSource).not.to.be.null; - }); - - it('deleteSource method', async function() { - const paymentSource = await stripe.customers.deleteSource( - 'cus_xxxxxxxxxxxxx', - 'card_xxxxxxxxxxxxx' - ); - expect(paymentSource).not.to.be.null; - }); - - it('retrieveSource method', async function() { - const paymentSource = await stripe.customers.retrieveSource( - 'cus_xxxxxxxxxxxxx', - 'ba_xxxxxxxxxxxxx' - ); - expect(paymentSource).not.to.be.null; - }); - - it('retrieveSource method', async function() { - const paymentSource = await stripe.customers.retrieveSource( - 'cus_xxxxxxxxxxxxx', - 'card_xxxxxxxxxxxxx' - ); - expect(paymentSource).not.to.be.null; - }); - - it('updateSource method', async function() { - const card = await stripe.customers.updateSource( - 'cus_xxxxxxxxxxxxx', - 'ba_xxxxxxxxxxxxx', - {metadata: {order_id: '6735'}} - ); - expect(card).not.to.be.null; - }); - - it('updateSource method', async function() { - const card = await stripe.customers.updateSource( - 'cus_xxxxxxxxxxxxx', - 'card_xxxxxxxxxxxxx', - {name: 'Jenny Rosen'} - ); - expect(card).not.to.be.null; - }); - - it('verifySource method', async function() { - const bankAccount = await stripe.customers.verifySource( - 'cus_xxxxxxxxxxxxx', - 'ba_xxxxxxxxxxxxx', - {amounts: [32, 45]} - ); - expect(bankAccount).not.to.be.null; - }); -}); -describe('LoginLinks', function() { it('createLoginLink method', async function() { const loginLink = await stripe.accounts.createLoginLink( 'acct_xxxxxxxxxxxxx' ); expect(loginLink).not.to.be.null; }); -}); -describe('Persons', function() { it('listPersons method', async function() { const persons = await stripe.accounts.listPersons('acct_xxxxxxxxxxxxx', { limit: 3, @@ -1282,6 +1334,56 @@ describe('Persons', function() { }); }); +describe('Subscriptions', function() { + it('resume method', async function() { + const subscription = await stripe.subscriptions.resume( + 'sub_xxxxxxxxxxxxx', + {proration_date: 1675400000, proration_behavior: 'always_invoice'} + ); + expect(subscription).not.to.be.null; + }); + + it('list method', async function() { + const subscriptions = await stripe.subscriptions.list({limit: 3}); + expect(subscriptions).not.to.be.null; + }); + + it('create method', async function() { + const subscription = await stripe.subscriptions.create({ + customer: 'cus_xxxxxxxxxxxxx', + items: [{price: 'price_xxxxxxxxxxxxx'}], + }); + expect(subscription).not.to.be.null; + }); + + it('cancel method', async function() { + const subscription = await stripe.subscriptions.cancel('sub_xxxxxxxxxxxxx'); + expect(subscription).not.to.be.null; + }); + + it('retrieve method', async function() { + const subscription = await stripe.subscriptions.retrieve( + 'sub_xxxxxxxxxxxxx' + ); + expect(subscription).not.to.be.null; + }); + + it('update method', async function() { + const subscription = await stripe.subscriptions.update( + 'sub_xxxxxxxxxxxxx', + {metadata: {order_id: '6735'}} + ); + expect(subscription).not.to.be.null; + }); + + it('search method', async function() { + const subscriptions = await stripe.subscriptions.search({ + query: "status:'active' AND metadata['order_id']:'6735'", + }); + expect(subscriptions).not.to.be.null; + }); +}); + describe('ApplicationFees', function() { it('list method', async function() { const applicationFees = await stripe.applicationFees.list({limit: 3}); @@ -1294,39 +1396,37 @@ describe('ApplicationFees', function() { ); expect(applicationFee).not.to.be.null; }); -}); -describe('FeeRefunds', function() { it('listRefunds method', async function() { - const refunds = await stripe.applicationFees.listRefunds( + const feeRefunds = await stripe.applicationFees.listRefunds( 'fee_xxxxxxxxxxxxx', {limit: 3} ); - expect(refunds).not.to.be.null; + expect(feeRefunds).not.to.be.null; }); it('createRefund method', async function() { - const refund = await stripe.applicationFees.createRefund( + const feeRefund = await stripe.applicationFees.createRefund( 'fee_xxxxxxxxxxxxx' ); - expect(refund).not.to.be.null; + expect(feeRefund).not.to.be.null; }); it('retrieveRefund method', async function() { - const refund = await stripe.applicationFees.retrieveRefund( + const feeRefund = await stripe.applicationFees.retrieveRefund( 'fee_xxxxxxxxxxxxx', 'fr_xxxxxxxxxxxxx' ); - expect(refund).not.to.be.null; + expect(feeRefund).not.to.be.null; }); it('updateRefund method', async function() { - const refund = await stripe.applicationFees.updateRefund( + const feeRefund = await stripe.applicationFees.updateRefund( 'fee_xxxxxxxxxxxxx', 'fr_xxxxxxxxxxxxx', {metadata: {order_id: '6735'}} ); - expect(refund).not.to.be.null; + expect(feeRefund).not.to.be.null; }); }); @@ -1515,6 +1615,14 @@ describe('CreditNotes', function() { expect(creditNote).not.to.be.null; }); + it('listLineItems method', async function() { + const creditNoteLineItems = await stripe.creditNotes.listLineItems( + 'cn_xxxxxxxxxxxxx', + {limit: 3} + ); + expect(creditNoteLineItems).not.to.be.null; + }); + it('preview method', async function() { const creditNote = await stripe.creditNotes.preview({ invoice: 'in_xxxxxxxxxxxxx', @@ -1530,84 +1638,6 @@ describe('CreditNotes', function() { }); }); -describe('CreditNoteLineItems', function() { - it('listLineItems method', async function() { - const lineItems = await stripe.creditNotes.listLineItems( - 'cn_xxxxxxxxxxxxx', - {limit: 3} - ); - expect(lineItems).not.to.be.null; - }); -}); - -describe('CustomerBalanceTransactions', function() { - it('listBalanceTransactions method', async function() { - const balanceTransactions = await stripe.customers.listBalanceTransactions( - 'cus_xxxxxxxxxxxxx', - {limit: 3} - ); - expect(balanceTransactions).not.to.be.null; - }); - - it('createBalanceTransaction method', async function() { - const balanceTransaction = await stripe.customers.createBalanceTransaction( - 'cus_xxxxxxxxxxxxx', - {amount: -500, currency: 'usd'} - ); - expect(balanceTransaction).not.to.be.null; - }); - - it('retrieveBalanceTransaction method', async function() { - const balanceTransaction = await stripe.customers.retrieveBalanceTransaction( - 'cus_xxxxxxxxxxxxx', - 'cbtxn_xxxxxxxxxxxxx' - ); - expect(balanceTransaction).not.to.be.null; - }); - - it('updateBalanceTransaction method', async function() { - const balanceTransaction = await stripe.customers.updateBalanceTransaction( - 'cus_xxxxxxxxxxxxx', - 'cbtxn_xxxxxxxxxxxxx', - {metadata: {order_id: '6735'}} - ); - expect(balanceTransaction).not.to.be.null; - }); -}); - -describe('TaxIds', function() { - it('listTaxIds method', async function() { - const taxIds = await stripe.customers.listTaxIds('cus_xxxxxxxxxxxxx', { - limit: 3, - }); - expect(taxIds).not.to.be.null; - }); - - it('createTaxId method', async function() { - const taxId = await stripe.customers.createTaxId('cus_xxxxxxxxxxxxx', { - type: 'eu_vat', - value: 'DE123456789', - }); - expect(taxId).not.to.be.null; - }); - - it('deleteTaxId method', async function() { - const deleted = await stripe.customers.deleteTaxId( - 'cus_xxxxxxxxxxxxx', - 'txi_xxxxxxxxxxxxx' - ); - expect(deleted).not.to.be.null; - }); - - it('retrieveTaxId method', async function() { - const taxId = await stripe.customers.retrieveTaxId( - 'cus_xxxxxxxxxxxxx', - 'txi_xxxxxxxxxxxxx' - ); - expect(taxId).not.to.be.null; - }); -}); - describe('Disputes', function() { it('list method', async function() { const disputes = await stripe.disputes.list({limit: 3}); @@ -1670,18 +1700,6 @@ describe('FileLinks', function() { }); }); -describe('Files', function() { - it('list method', async function() { - const files = await stripe.files.list({limit: 3}); - expect(files).not.to.be.null; - }); - - it('retrieve method', async function() { - const file = await stripe.files.retrieve('file_xxxxxxxxxxxxx'); - expect(file).not.to.be.null; - }); -}); - describe('Identity.VerificationReports', function() { it('list method', async function() { const verificationReports = await stripe.identity.verificationReports.list({ @@ -2407,9 +2425,7 @@ describe('SubscriptionItems', function() { ); expect(subscriptionItem).not.to.be.null; }); -}); -describe('UsageRecordSummaries', function() { it('listUsageRecordSummaries method', async function() { const usageRecordSummaries = await stripe.subscriptionItems.listUsageRecordSummaries( 'si_xxxxxxxxxxxxx', @@ -2417,9 +2433,7 @@ describe('UsageRecordSummaries', function() { ); expect(usageRecordSummaries).not.to.be.null; }); -}); -describe('UsageRecords', function() { it('createUsageRecord method', async function() { const usageRecord = await stripe.subscriptionItems.createUsageRecord( 'si_xxxxxxxxxxxxx', @@ -2482,48 +2496,6 @@ describe('SubscriptionSchedules', function() { }); }); -describe('Subscriptions', function() { - it('list method', async function() { - const subscriptions = await stripe.subscriptions.list({limit: 3}); - expect(subscriptions).not.to.be.null; - }); - - it('create method', async function() { - const subscription = await stripe.subscriptions.create({ - customer: 'cus_xxxxxxxxxxxxx', - items: [{price: 'price_xxxxxxxxxxxxx'}], - }); - expect(subscription).not.to.be.null; - }); - - it('cancel method', async function() { - const subscription = await stripe.subscriptions.cancel('sub_xxxxxxxxxxxxx'); - expect(subscription).not.to.be.null; - }); - - it('retrieve method', async function() { - const subscription = await stripe.subscriptions.retrieve( - 'sub_xxxxxxxxxxxxx' - ); - expect(subscription).not.to.be.null; - }); - - it('update method', async function() { - const subscription = await stripe.subscriptions.update( - 'sub_xxxxxxxxxxxxx', - {metadata: {order_id: '6735'}} - ); - expect(subscription).not.to.be.null; - }); - - it('search method', async function() { - const subscriptions = await stripe.subscriptions.search({ - query: "status:'active' AND metadata['order_id']:'6735'", - }); - expect(subscriptions).not.to.be.null; - }); -}); - describe('TaxCodes', function() { it('list method', async function() { const taxCodes = await stripe.taxCodes.list({limit: 3}); @@ -2722,38 +2694,38 @@ describe('Transfers', function() { }); expect(transfer).not.to.be.null; }); -}); -describe('TransferReversals', function() { it('listReversals method', async function() { - const reversals = await stripe.transfers.listReversals('tr_xxxxxxxxxxxxx', { - limit: 3, - }); - expect(reversals).not.to.be.null; + const transferReversals = await stripe.transfers.listReversals( + 'tr_xxxxxxxxxxxxx', + {limit: 3} + ); + expect(transferReversals).not.to.be.null; }); it('createReversal method', async function() { - const reversal = await stripe.transfers.createReversal('tr_xxxxxxxxxxxxx', { - amount: 100, - }); - expect(reversal).not.to.be.null; + const transferReversal = await stripe.transfers.createReversal( + 'tr_xxxxxxxxxxxxx', + {amount: 100} + ); + expect(transferReversal).not.to.be.null; }); it('retrieveReversal method', async function() { - const reversal = await stripe.transfers.retrieveReversal( + const transferReversal = await stripe.transfers.retrieveReversal( 'tr_xxxxxxxxxxxxx', 'trr_xxxxxxxxxxxxx' ); - expect(reversal).not.to.be.null; + expect(transferReversal).not.to.be.null; }); it('updateReversal method', async function() { - const reversal = await stripe.transfers.updateReversal( + const transferReversal = await stripe.transfers.updateReversal( 'tr_xxxxxxxxxxxxx', 'trr_xxxxxxxxxxxxx', {metadata: {order_id: '6735'}} ); - expect(reversal).not.to.be.null; + expect(transferReversal).not.to.be.null; }); }); diff --git a/types/AccountsResource.d.ts b/types/AccountsResource.d.ts index c0375dc4d4..8f9d7045b9 100644 --- a/types/AccountsResource.d.ts +++ b/types/AccountsResource.d.ts @@ -2431,44 +2431,6 @@ declare module 'stripe' { interface AccountDeleteParams {} - interface AccountRejectParams { - /** - * The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. - */ - reason: string; - - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - - interface CapabilityRetrieveParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - - interface CapabilityUpdateParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - - /** - * Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - */ - requested?: boolean; - } - - interface CapabilityListParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - interface ExternalAccountCreateParams { /** * Please refer to full [documentation](https://stripe.com/docs/api) instead. @@ -2491,113 +2453,6 @@ declare module 'stripe' { metadata?: Stripe.MetadataParam; } - interface ExternalAccountRetrieveParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - - interface ExternalAccountUpdateParams { - /** - * The name of the person or business that owns the bank account. - */ - account_holder_name?: string; - - /** - * The type of entity that holds the account. This can be either `individual` or `company`. - */ - account_holder_type?: Stripe.Emptyable< - ExternalAccountUpdateParams.AccountHolderType - >; - - /** - * The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - */ - account_type?: ExternalAccountUpdateParams.AccountType; - - /** - * City/District/Suburb/Town/Village. - */ - address_city?: string; - - /** - * Billing address country, if provided when creating card. - */ - address_country?: string; - - /** - * Address line 1 (Street address/PO Box/Company name). - */ - address_line1?: string; - - /** - * Address line 2 (Apartment/Suite/Unit/Building). - */ - address_line2?: string; - - /** - * State/County/Province/Region. - */ - address_state?: string; - - /** - * ZIP or postal code. - */ - address_zip?: string; - - /** - * When set to true, this becomes the default external account for its currency. - */ - default_for_currency?: boolean; - - /** - * Two digit number representing the card's expiration month. - */ - exp_month?: string; - - /** - * Four digit number representing the card's expiration year. - */ - exp_year?: string; - - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - - /** - * Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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?: Stripe.Emptyable; - - /** - * Cardholder name. - */ - name?: string; - } - - namespace ExternalAccountUpdateParams { - type AccountHolderType = 'company' | 'individual'; - - type AccountType = 'checking' | 'futsu' | 'savings' | 'toza'; - } - - interface ExternalAccountListParams extends PaginationParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - - object?: ExternalAccountListParams.Object; - } - - namespace ExternalAccountListParams { - type Object = 'bank_account' | 'card'; - } - - interface ExternalAccountDeleteParams {} - interface LoginLinkCreateParams { /** * Specifies which fields in the response should be expanded. @@ -2871,11 +2726,194 @@ declare module 'stripe' { } } - interface PersonRetrieveParams { + interface ExternalAccountDeleteParams {} + + interface PersonDeleteParams {} + + interface CapabilityListParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface ExternalAccountListParams extends PaginationParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + object?: ExternalAccountListParams.Object; + } + + namespace ExternalAccountListParams { + type Object = 'bank_account' | 'card'; + } + + interface PersonListParams extends PaginationParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Filters on the list of people returned based on the person's relationship to the account's company. + */ + relationship?: PersonListParams.Relationship; + } + + namespace PersonListParams { + interface Relationship { + /** + * A filter on the list of people returned based on whether these people are directors of the account's company. + */ + director?: boolean; + + /** + * A filter on the list of people returned based on whether these people are executives of the account's company. + */ + executive?: boolean; + + /** + * A filter on the list of people returned based on whether these people are owners of the account's company. + */ + owner?: boolean; + + /** + * A filter on the list of people returned based on whether these people are the representative of the account's company. + */ + representative?: boolean; + } + } + + interface AccountRejectParams { + /** + * The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. + */ + reason: string; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface CapabilityRetrieveParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface ExternalAccountRetrieveParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface PersonRetrieveParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface CapabilityUpdateParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + */ + requested?: boolean; + } + + interface ExternalAccountUpdateParams { + /** + * The name of the person or business that owns the bank account. + */ + account_holder_name?: string; + + /** + * The type of entity that holds the account. This can be either `individual` or `company`. + */ + account_holder_type?: Stripe.Emptyable< + ExternalAccountUpdateParams.AccountHolderType + >; + + /** + * The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + */ + account_type?: ExternalAccountUpdateParams.AccountType; + + /** + * City/District/Suburb/Town/Village. + */ + address_city?: string; + + /** + * Billing address country, if provided when creating card. + */ + address_country?: string; + + /** + * Address line 1 (Street address/PO Box/Company name). + */ + address_line1?: string; + + /** + * Address line 2 (Apartment/Suite/Unit/Building). + */ + address_line2?: string; + + /** + * State/County/Province/Region. + */ + address_state?: string; + + /** + * ZIP or postal code. + */ + address_zip?: string; + + /** + * When set to true, this becomes the default external account for its currency. + */ + default_for_currency?: boolean; + + /** + * Two digit number representing the card's expiration month. + */ + exp_month?: string; + + /** + * Four digit number representing the card's expiration year. + */ + exp_year?: string; + /** * Specifies which fields in the response should be expanded. */ expand?: Array; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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?: Stripe.Emptyable; + + /** + * Cardholder name. + */ + name?: string; + } + + namespace ExternalAccountUpdateParams { + type AccountHolderType = 'company' | 'individual'; + + type AccountType = 'checking' | 'futsu' | 'savings' | 'toza'; } interface PersonUpdateParams { @@ -3144,44 +3182,6 @@ declare module 'stripe' { } } - interface PersonListParams extends PaginationParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - - /** - * Filters on the list of people returned based on the person's relationship to the account's company. - */ - relationship?: PersonListParams.Relationship; - } - - namespace PersonListParams { - interface Relationship { - /** - * A filter on the list of people returned based on whether these people are directors of the account's company. - */ - director?: boolean; - - /** - * A filter on the list of people returned based on whether these people are executives of the account's company. - */ - executive?: boolean; - - /** - * A filter on the list of people returned based on whether these people are owners of the account's company. - */ - owner?: boolean; - - /** - * A filter on the list of people returned based on whether these people are the representative of the account's company. - */ - representative?: boolean; - } - } - - interface PersonDeleteParams {} - class AccountsResource { /** * With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users. @@ -3257,89 +3257,88 @@ declare module 'stripe' { ): Promise>; /** - * With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious. - * - * Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero. + * Create an external account for a given account. */ - reject( + createExternalAccount( id: string, - params: AccountRejectParams, + params: ExternalAccountCreateParams, options?: RequestOptions - ): Promise>; + ): Promise>; /** - * Retrieves information about the specified Account Capability. + * Creates a single-use login link for an Express account to access their Stripe dashboard. + * + * You may only create login links for [Express accounts](https://stripe.com/docs/connect/express-accounts) connected to your platform. */ - retrieveCapability( - accountId: string, - id: string, - params?: CapabilityRetrieveParams, - options?: RequestOptions - ): Promise>; - retrieveCapability( - accountId: string, + createLoginLink( id: string, + params?: LoginLinkCreateParams, options?: RequestOptions - ): Promise>; - - /** - * Updates an existing Account Capability. - */ - updateCapability( - accountId: string, + ): Promise>; + createLoginLink( id: string, - params?: CapabilityUpdateParams, options?: RequestOptions - ): Promise>; + ): Promise>; /** - * Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first. + * Creates a new person. */ - listCapabilities( + createPerson( id: string, - params?: CapabilityListParams, + params?: PersonCreateParams, options?: RequestOptions - ): ApiListPromise; - listCapabilities( + ): Promise>; + createPerson( id: string, options?: RequestOptions - ): ApiListPromise; + ): Promise>; /** - * Create an external account for a given account. + * Delete a specified external account for a given account. */ - createExternalAccount( + deleteExternalAccount( + accountId: string, id: string, - params: ExternalAccountCreateParams, + params?: ExternalAccountDeleteParams, options?: RequestOptions - ): Promise>; + ): Promise< + Stripe.Response + >; + deleteExternalAccount( + accountId: string, + id: string, + options?: RequestOptions + ): Promise< + Stripe.Response + >; /** - * Retrieve a specified external account for a given account. + * Deletes an existing person's relationship to the account's legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file. */ - retrieveExternalAccount( + deletePerson( accountId: string, id: string, - params?: ExternalAccountRetrieveParams, + params?: PersonDeleteParams, options?: RequestOptions - ): Promise>; - retrieveExternalAccount( + ): Promise>; + deletePerson( accountId: string, id: string, options?: RequestOptions - ): Promise>; + ): Promise>; /** - * Updates the metadata, account holder name, account holder type of a bank account belonging to a [Custom account](https://stripe.com/docs/connect/custom-accounts), and optionally sets it as the default for its currency. Other bank account details are not editable by design. - * - * You can re-enable a disabled bank account by performing an update call without providing any arguments or changes. + * Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first. */ - updateExternalAccount( - accountId: string, + listCapabilities( id: string, - params?: ExternalAccountUpdateParams, + params?: CapabilityListParams, options?: RequestOptions - ): Promise>; + ): ApiListPromise; + listCapabilities( + id: string, + options?: RequestOptions + ): ApiListPromise; /** * List external accounts for an account. @@ -3355,51 +3354,58 @@ declare module 'stripe' { ): ApiListPromise; /** - * Delete a specified external account for a given account. + * Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. */ - deleteExternalAccount( - accountId: string, + listPersons( id: string, - params?: ExternalAccountDeleteParams, + params?: PersonListParams, options?: RequestOptions - ): Promise< - Stripe.Response - >; - deleteExternalAccount( - accountId: string, + ): ApiListPromise; + listPersons( id: string, options?: RequestOptions - ): Promise< - Stripe.Response - >; + ): ApiListPromise; /** - * Creates a single-use login link for an Express account to access their Stripe dashboard. + * With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious. * - * You may only create login links for [Express accounts](https://stripe.com/docs/connect/express-accounts) connected to your platform. + * Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero. */ - createLoginLink( + reject( id: string, - params?: LoginLinkCreateParams, + params: AccountRejectParams, options?: RequestOptions - ): Promise>; - createLoginLink( + ): Promise>; + + /** + * Retrieves information about the specified Account Capability. + */ + retrieveCapability( + accountId: string, id: string, + params?: CapabilityRetrieveParams, options?: RequestOptions - ): Promise>; + ): Promise>; + retrieveCapability( + accountId: string, + id: string, + options?: RequestOptions + ): Promise>; /** - * Creates a new person. + * Retrieve a specified external account for a given account. */ - createPerson( + retrieveExternalAccount( + accountId: string, id: string, - params?: PersonCreateParams, + params?: ExternalAccountRetrieveParams, options?: RequestOptions - ): Promise>; - createPerson( + ): Promise>; + retrieveExternalAccount( + accountId: string, id: string, options?: RequestOptions - ): Promise>; + ): Promise>; /** * Retrieves an existing person. @@ -3417,42 +3423,51 @@ declare module 'stripe' { ): Promise>; /** - * Updates an existing person. + * Updates an existing Account Capability. */ - updatePerson( + updateCapability( accountId: string, id: string, - params?: PersonUpdateParams, + params?: CapabilityUpdateParams, options?: RequestOptions - ): Promise>; + ): Promise>; + updateCapability( + accountId: string, + id: string, + options?: RequestOptions + ): Promise>; /** - * Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. + * Updates the metadata, account holder name, account holder type of a bank account belonging to a [Custom account](https://stripe.com/docs/connect/custom-accounts), and optionally sets it as the default for its currency. Other bank account details are not editable by design. + * + * You can re-enable a disabled bank account by performing an update call without providing any arguments or changes. */ - listPersons( + updateExternalAccount( + accountId: string, id: string, - params?: PersonListParams, + params?: ExternalAccountUpdateParams, options?: RequestOptions - ): ApiListPromise; - listPersons( + ): Promise>; + updateExternalAccount( + accountId: string, id: string, options?: RequestOptions - ): ApiListPromise; + ): Promise>; /** - * Deletes an existing person's relationship to the account's legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file. + * Updates an existing person. */ - deletePerson( + updatePerson( accountId: string, id: string, - params?: PersonDeleteParams, + params?: PersonUpdateParams, options?: RequestOptions - ): Promise>; - deletePerson( + ): Promise>; + updatePerson( accountId: string, id: string, options?: RequestOptions - ): Promise>; + ): Promise>; } } } diff --git a/types/ApplicationFeesResource.d.ts b/types/ApplicationFeesResource.d.ts index 3216e6a8c9..0422dace47 100644 --- a/types/ApplicationFeesResource.d.ts +++ b/types/ApplicationFeesResource.d.ts @@ -40,6 +40,13 @@ declare module 'stripe' { metadata?: Stripe.MetadataParam; } + interface FeeRefundListParams extends PaginationParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + interface FeeRefundRetrieveParams { /** * Specifies which fields in the response should be expanded. @@ -59,13 +66,6 @@ declare module 'stripe' { metadata?: Stripe.Emptyable; } - interface FeeRefundListParams extends PaginationParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - class ApplicationFeesResource { /** * Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee. @@ -110,6 +110,19 @@ declare module 'stripe' { options?: RequestOptions ): Promise>; + /** + * You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds. + */ + listRefunds( + id: string, + params?: FeeRefundListParams, + options?: RequestOptions + ): ApiListPromise; + listRefunds( + id: string, + options?: RequestOptions + ): ApiListPromise; + /** * By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee. */ @@ -136,19 +149,11 @@ declare module 'stripe' { params?: FeeRefundUpdateParams, options?: RequestOptions ): Promise>; - - /** - * You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds. - */ - listRefunds( - id: string, - params?: FeeRefundListParams, - options?: RequestOptions - ): ApiListPromise; - listRefunds( + updateRefund( + feeId: string, id: string, options?: RequestOptions - ): ApiListPromise; + ): Promise>; } } } diff --git a/types/CreditNotesResource.d.ts b/types/CreditNotesResource.d.ts index 42049d27e2..f2dc3d7496 100644 --- a/types/CreditNotesResource.d.ts +++ b/types/CreditNotesResource.d.ts @@ -166,6 +166,13 @@ declare module 'stripe' { invoice?: string; } + interface CreditNoteLineItemListParams extends PaginationParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + interface CreditNoteListPreviewLineItemsParams extends PaginationParams { /** * ID of the invoice. @@ -419,13 +426,6 @@ declare module 'stripe' { expand?: Array; } - interface CreditNoteLineItemListParams extends PaginationParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - class CreditNotesResource { /** * Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces @@ -479,6 +479,19 @@ declare module 'stripe' { ): ApiListPromise; list(options?: RequestOptions): ApiListPromise; + /** + * When retrieving a credit note, you'll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ + listLineItems( + id: string, + params?: CreditNoteLineItemListParams, + options?: RequestOptions + ): ApiListPromise; + listLineItems( + id: string, + options?: RequestOptions + ): ApiListPromise; + /** * When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items. */ @@ -507,19 +520,6 @@ declare module 'stripe' { id: string, options?: RequestOptions ): Promise>; - - /** - * When retrieving a credit note, you'll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. - */ - listLineItems( - id: string, - params?: CreditNoteLineItemListParams, - options?: RequestOptions - ): ApiListPromise; - listLineItems( - id: string, - options?: RequestOptions - ): ApiListPromise; } } } diff --git a/types/CustomersResource.d.ts b/types/CustomersResource.d.ts index 284868a581..72624ba8ec 100644 --- a/types/CustomersResource.d.ts +++ b/types/CustomersResource.d.ts @@ -560,8 +560,135 @@ declare module 'stripe' { } } + interface CustomerBalanceTransactionCreateParams { + /** + * The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. + */ + amount: number; + + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value. + */ + currency: string; + + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: string; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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?: Stripe.Emptyable; + } + + interface CustomerSourceCreateParams { + /** + * Please refer to full [documentation](https://stripe.com/docs/api) instead. + */ + source: string; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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?: Stripe.MetadataParam; + + validate?: boolean; + } + + interface TaxIdCreateParams { + /** + * Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` + */ + type: TaxIdCreateParams.Type; + + /** + * Value of the tax ID. + */ + value: string; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + namespace TaxIdCreateParams { + type Type = + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'eg_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'jp_trn' + | 'ke_pin' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ph_tin' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tr_tin' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat'; + } + interface CustomerDeleteDiscountParams {} + interface CustomerSourceDeleteParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface TaxIdDeleteParams {} + interface CustomerListPaymentMethodsParams extends PaginationParams { /** * Specifies which fields in the response should be expanded. @@ -607,106 +734,87 @@ declare module 'stripe' { | 'wechat_pay'; } - interface CustomerRetrievePaymentMethodParams { + interface CustomerBalanceTransactionListParams extends PaginationParams { /** * Specifies which fields in the response should be expanded. */ expand?: Array; } - interface CustomerSearchParams { - /** - * The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). - */ - query: string; - + interface CustomerCashBalanceTransactionListParams + extends PaginationParams { /** * Specifies which fields in the response should be expanded. */ expand?: Array; + } + interface CustomerSourceListParams extends PaginationParams { /** - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * Specifies which fields in the response should be expanded. */ - limit?: number; + expand?: Array; /** - * A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Filter sources according to a particular object type. */ - page?: string; + object?: string; } - interface CashBalanceRetrieveParams { + interface TaxIdListParams extends PaginationParams { /** * Specifies which fields in the response should be expanded. */ expand?: Array; } - interface CashBalanceUpdateParams { + interface CustomerRetrievePaymentMethodParams { /** * Specifies which fields in the response should be expanded. */ expand?: Array; - - /** - * A hash of settings for this cash balance. - */ - settings?: CashBalanceUpdateParams.Settings; - } - - namespace CashBalanceUpdateParams { - interface Settings { - /** - * Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). - */ - reconciliation_mode?: Settings.ReconciliationMode; - } - - namespace Settings { - type ReconciliationMode = 'automatic' | 'manual' | 'merchant_default'; - } } - interface CustomerBalanceTransactionCreateParams { - /** - * The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. - */ - amount: number; - + interface CustomerBalanceTransactionRetrieveParams { /** - * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value. + * Specifies which fields in the response should be expanded. */ - currency: string; + expand?: Array; + } + interface CashBalanceRetrieveParams { /** - * An arbitrary string attached to the object. Often useful for displaying to users. + * Specifies which fields in the response should be expanded. */ - description?: string; + expand?: Array; + } + interface CustomerCashBalanceTransactionRetrieveParams { /** * Specifies which fields in the response should be expanded. */ expand?: Array; + } + interface CustomerSourceRetrieveParams { /** - * Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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`. + * Specifies which fields in the response should be expanded. */ - metadata?: Stripe.Emptyable; + expand?: Array; } - interface CustomerBalanceTransactionRetrieveParams { + interface TaxIdRetrieveParams { /** * Specifies which fields in the response should be expanded. */ expand?: Array; } - interface CustomerBalanceTransactionUpdateParams { + interface CustomerSearchParams { /** - * An arbitrary string attached to the object. Often useful for displaying to users. + * The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). */ - description?: string; + query: string; /** * Specifies which fields in the response should be expanded. @@ -714,57 +822,56 @@ declare module 'stripe' { expand?: Array; /** - * Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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`. + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - metadata?: Stripe.Emptyable; - } + limit?: number; - interface CustomerBalanceTransactionListParams extends PaginationParams { /** - * Specifies which fields in the response should be expanded. + * A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ - expand?: Array; + page?: string; } - interface CustomerCashBalanceTransactionRetrieveParams { + interface CustomerBalanceTransactionUpdateParams { /** - * Specifies which fields in the response should be expanded. + * An arbitrary string attached to the object. Often useful for displaying to users. */ - expand?: Array; - } + description?: string; - interface CustomerCashBalanceTransactionListParams - extends PaginationParams { /** * Specifies which fields in the response should be expanded. */ expand?: Array; - } - interface CustomerSourceCreateParams { /** - * Please refer to full [documentation](https://stripe.com/docs/api) instead. + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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`. */ - source: string; + metadata?: Stripe.Emptyable; + } + interface CashBalanceUpdateParams { /** * Specifies which fields in the response should be expanded. */ expand?: Array; /** - * Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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`. + * A hash of settings for this cash balance. */ - metadata?: Stripe.MetadataParam; - - validate?: boolean; + settings?: CashBalanceUpdateParams.Settings; } - interface CustomerSourceRetrieveParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; + namespace CashBalanceUpdateParams { + interface Settings { + /** + * Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + */ + reconciliation_mode?: Settings.ReconciliationMode; + } + + namespace Settings { + type ReconciliationMode = 'automatic' | 'manual' | 'merchant_default'; + } } interface CustomerSourceUpdateParams { @@ -862,28 +969,9 @@ declare module 'stripe' { } } - interface CustomerSourceListParams extends PaginationParams { + interface CustomerSourceVerifyParams { /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - - /** - * Filter sources according to a particular object type. - */ - object?: string; - } - - interface CustomerSourceDeleteParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - - interface CustomerSourceVerifyParams { - /** - * Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + * Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ amounts?: Array; @@ -893,94 +981,6 @@ declare module 'stripe' { expand?: Array; } - interface TaxIdCreateParams { - /** - * Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` - */ - type: TaxIdCreateParams.Type; - - /** - * Value of the tax ID. - */ - value: string; - - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - - namespace TaxIdCreateParams { - type Type = - | 'ae_trn' - | 'au_abn' - | 'au_arn' - | 'bg_uic' - | 'br_cnpj' - | 'br_cpf' - | 'ca_bn' - | 'ca_gst_hst' - | 'ca_pst_bc' - | 'ca_pst_mb' - | 'ca_pst_sk' - | 'ca_qst' - | 'ch_vat' - | 'cl_tin' - | 'eg_tin' - | 'es_cif' - | 'eu_oss_vat' - | 'eu_vat' - | 'gb_vat' - | 'ge_vat' - | 'hk_br' - | 'hu_tin' - | 'id_npwp' - | 'il_vat' - | 'in_gst' - | 'is_vat' - | 'jp_cn' - | 'jp_rn' - | 'jp_trn' - | 'ke_pin' - | 'kr_brn' - | 'li_uid' - | 'mx_rfc' - | 'my_frp' - | 'my_itn' - | 'my_sst' - | 'no_vat' - | 'nz_gst' - | 'ph_tin' - | 'ru_inn' - | 'ru_kpp' - | 'sa_vat' - | 'sg_gst' - | 'sg_uen' - | 'si_tin' - | 'th_vat' - | 'tr_tin' - | 'tw_vat' - | 'ua_vat' - | 'us_ein' - | 'za_vat'; - } - - interface TaxIdRetrieveParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - - interface TaxIdListParams extends PaginationParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - - interface TaxIdDeleteParams {} - class CustomersResource { /** * Creates a new customer object. @@ -1050,6 +1050,37 @@ declare module 'stripe' { options?: RequestOptions ): Promise>; + /** + * Creates an immutable transaction that updates the customer's credit [balance](https://stripe.com/docs/billing/customer/balance). + */ + createBalanceTransaction( + id: string, + params: CustomerBalanceTransactionCreateParams, + options?: RequestOptions + ): Promise>; + + /** + * When you create a new credit card, you must specify a customer or recipient on which to create it. + * + * If the card's owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should [update the customer](https://stripe.com/docs/api#update_customer) to have a new default_source. + */ + createSource( + id: string, + params: CustomerSourceCreateParams, + options?: RequestOptions + ): Promise>; + + /** + * Creates a new TaxID object for a customer. + */ + createTaxId( + id: string, + params: TaxIdCreateParams, + options?: RequestOptions + ): Promise>; + /** * Removes the currently applied discount on a customer. */ @@ -1063,6 +1094,44 @@ declare module 'stripe' { options?: RequestOptions ): Promise>; + /** + * Delete a specified source for a given customer. + */ + deleteSource( + customerId: string, + id: string, + params?: CustomerSourceDeleteParams, + options?: RequestOptions + ): Promise< + Stripe.Response< + Stripe.CustomerSource | Stripe.DeletedBankAccount | Stripe.DeletedCard + > + >; + deleteSource( + customerId: string, + id: string, + options?: RequestOptions + ): Promise< + Stripe.Response< + Stripe.CustomerSource | Stripe.DeletedBankAccount | Stripe.DeletedCard + > + >; + + /** + * Deletes an existing TaxID object. + */ + deleteTaxId( + customerId: string, + id: string, + params?: TaxIdDeleteParams, + options?: RequestOptions + ): Promise>; + deleteTaxId( + customerId: string, + id: string, + options?: RequestOptions + ): Promise>; + /** * Returns a list of PaymentMethods for a given Customer */ @@ -1077,61 +1146,71 @@ declare module 'stripe' { ): ApiListPromise; /** - * Retrieves a PaymentMethod object for a given Customer. + * Returns a list of transactions that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance). */ - retrievePaymentMethod( - customerId: string, + listBalanceTransactions( id: string, - params?: CustomerRetrievePaymentMethodParams, + params?: CustomerBalanceTransactionListParams, options?: RequestOptions - ): Promise>; - retrievePaymentMethod( - customerId: string, + ): ApiListPromise; + listBalanceTransactions( id: string, options?: RequestOptions - ): Promise>; + ): ApiListPromise; /** - * Search for customers you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). - * Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating - * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up - * to an hour behind during outages. Search functionality is not available to merchants in India. + * Returns a list of transactions that modified the customer's [cash balance](https://stripe.com/docs/payments/customer-balance). */ - search( - params: CustomerSearchParams, + listCashBalanceTransactions( + id: string, + params?: CustomerCashBalanceTransactionListParams, options?: RequestOptions - ): ApiSearchResultPromise; + ): ApiListPromise; + listCashBalanceTransactions( + id: string, + options?: RequestOptions + ): ApiListPromise; /** - * Retrieves a customer's cash balance. + * List sources for a specified customer. */ - retrieveCashBalance( + listSources( id: string, - params?: CashBalanceRetrieveParams, + params?: CustomerSourceListParams, options?: RequestOptions - ): Promise>; - retrieveCashBalance( + ): ApiListPromise; + listSources( id: string, options?: RequestOptions - ): Promise>; + ): ApiListPromise; /** - * Changes the settings on a customer's cash balance. + * Returns a list of tax IDs for a customer. */ - updateCashBalance( + listTaxIds( id: string, - params?: CashBalanceUpdateParams, + params?: TaxIdListParams, options?: RequestOptions - ): Promise>; + ): ApiListPromise; + listTaxIds( + id: string, + options?: RequestOptions + ): ApiListPromise; /** - * Creates an immutable transaction that updates the customer's credit [balance](https://stripe.com/docs/billing/customer/balance). + * Retrieves a PaymentMethod object for a given Customer. */ - createBalanceTransaction( + retrievePaymentMethod( + customerId: string, id: string, - params: CustomerBalanceTransactionCreateParams, + params?: CustomerRetrievePaymentMethodParams, options?: RequestOptions - ): Promise>; + ): Promise>; + retrievePaymentMethod( + customerId: string, + id: string, + options?: RequestOptions + ): Promise>; /** * Retrieves a specific customer balance transaction that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance). @@ -1149,27 +1228,17 @@ declare module 'stripe' { ): Promise>; /** - * Most credit balance transaction fields are immutable, but you may update its description and metadata. - */ - updateBalanceTransaction( - customerId: string, - id: string, - params?: CustomerBalanceTransactionUpdateParams, - options?: RequestOptions - ): Promise>; - - /** - * Returns a list of transactions that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance). + * Retrieves a customer's cash balance. */ - listBalanceTransactions( + retrieveCashBalance( id: string, - params?: CustomerBalanceTransactionListParams, + params?: CashBalanceRetrieveParams, options?: RequestOptions - ): ApiListPromise; - listBalanceTransactions( + ): Promise>; + retrieveCashBalance( id: string, options?: RequestOptions - ): ApiListPromise; + ): Promise>; /** * Retrieves a specific cash balance transaction, which updated the customer's [cash balance](https://stripe.com/docs/payments/customer-balance). @@ -1186,32 +1255,6 @@ declare module 'stripe' { options?: RequestOptions ): Promise>; - /** - * Returns a list of transactions that modified the customer's [cash balance](https://stripe.com/docs/payments/customer-balance). - */ - listCashBalanceTransactions( - id: string, - params?: CustomerCashBalanceTransactionListParams, - options?: RequestOptions - ): ApiListPromise; - listCashBalanceTransactions( - id: string, - options?: RequestOptions - ): ApiListPromise; - - /** - * When you create a new credit card, you must specify a customer or recipient on which to create it. - * - * If the card's owner has no default card, then the new card will become the default. - * However, if the owner already has a default, then it will not change. - * To change the default, you should [update the customer](https://stripe.com/docs/api#update_customer) to have a new default_source. - */ - createSource( - id: string, - params: CustomerSourceCreateParams, - options?: RequestOptions - ): Promise>; - /** * Retrieve a specified source for a given customer. */ @@ -1228,119 +1271,92 @@ declare module 'stripe' { ): Promise>; /** - * Update a specified source for a given customer. + * Retrieves the TaxID object with the given identifier. */ - updateSource( + retrieveTaxId( customerId: string, id: string, - params?: CustomerSourceUpdateParams, - options?: RequestOptions - ): Promise< - Stripe.Response - >; - - /** - * List sources for a specified customer. - */ - listSources( - id: string, - params?: CustomerSourceListParams, + params?: TaxIdRetrieveParams, options?: RequestOptions - ): ApiListPromise; - listSources( + ): Promise>; + retrieveTaxId( + customerId: string, id: string, options?: RequestOptions - ): ApiListPromise; + ): Promise>; /** - * Delete a specified source for a given customer. + * Search for customers you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). + * Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India. */ - deleteSource( - customerId: string, - id: string, - params?: CustomerSourceDeleteParams, - options?: RequestOptions - ): Promise< - Stripe.Response< - Stripe.CustomerSource | Stripe.DeletedBankAccount | Stripe.DeletedCard - > - >; - deleteSource( - customerId: string, - id: string, + search( + params: CustomerSearchParams, options?: RequestOptions - ): Promise< - Stripe.Response< - Stripe.CustomerSource | Stripe.DeletedBankAccount | Stripe.DeletedCard - > - >; + ): ApiSearchResultPromise; /** - * Verify a specified bank account for a given customer. + * Most credit balance transaction fields are immutable, but you may update its description and metadata. */ - verifySource( + updateBalanceTransaction( customerId: string, id: string, - params?: CustomerSourceVerifyParams, + params?: CustomerBalanceTransactionUpdateParams, options?: RequestOptions - ): Promise>; - verifySource( + ): Promise>; + updateBalanceTransaction( customerId: string, id: string, options?: RequestOptions - ): Promise>; - - /** - * Creates a new TaxID object for a customer. - */ - createTaxId( - id: string, - params: TaxIdCreateParams, - options?: RequestOptions - ): Promise>; + ): Promise>; /** - * Retrieves the TaxID object with the given identifier. + * Changes the settings on a customer's cash balance. */ - retrieveTaxId( - customerId: string, + updateCashBalance( id: string, - params?: TaxIdRetrieveParams, + params?: CashBalanceUpdateParams, options?: RequestOptions - ): Promise>; - retrieveTaxId( - customerId: string, + ): Promise>; + updateCashBalance( id: string, options?: RequestOptions - ): Promise>; + ): Promise>; /** - * Returns a list of tax IDs for a customer. + * Update a specified source for a given customer. */ - listTaxIds( + updateSource( + customerId: string, id: string, - params?: TaxIdListParams, + params?: CustomerSourceUpdateParams, options?: RequestOptions - ): ApiListPromise; - listTaxIds( + ): Promise< + Stripe.Response + >; + updateSource( + customerId: string, id: string, options?: RequestOptions - ): ApiListPromise; + ): Promise< + Stripe.Response + >; /** - * Deletes an existing TaxID object. + * Verify a specified bank account for a given customer. */ - deleteTaxId( + verifySource( customerId: string, id: string, - params?: TaxIdDeleteParams, + params?: CustomerSourceVerifyParams, options?: RequestOptions - ): Promise>; - deleteTaxId( + ): Promise>; + verifySource( customerId: string, id: string, options?: RequestOptions - ): Promise>; + ): Promise>; } } } diff --git a/types/InvoicesResource.d.ts b/types/InvoicesResource.d.ts index 92e086cc2d..cfc92ba14c 100644 --- a/types/InvoicesResource.d.ts +++ b/types/InvoicesResource.d.ts @@ -1250,6 +1250,13 @@ declare module 'stripe' { expand?: Array; } + interface InvoiceLineItemListParams extends PaginationParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + interface InvoiceListUpcomingLinesParams extends PaginationParams { /** * Settings for automatic tax lookup for this invoice preview. @@ -2380,13 +2387,6 @@ declare module 'stripe' { expand?: Array; } - interface InvoiceLineItemListParams extends PaginationParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - class InvoicesResource { /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers. @@ -2461,6 +2461,19 @@ declare module 'stripe' { options?: RequestOptions ): Promise>; + /** + * When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + */ + listLineItems( + id: string, + params?: InvoiceLineItemListParams, + options?: RequestOptions + ): ApiListPromise; + listLineItems( + id: string, + options?: RequestOptions + ): ApiListPromise; + /** * When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. */ @@ -2551,19 +2564,6 @@ declare module 'stripe' { id: string, options?: RequestOptions ): Promise>; - - /** - * When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. - */ - listLineItems( - id: string, - params?: InvoiceLineItemListParams, - options?: RequestOptions - ): ApiListPromise; - listLineItems( - id: string, - options?: RequestOptions - ): ApiListPromise; } } } diff --git a/types/TransfersResource.d.ts b/types/TransfersResource.d.ts index 993822e6bc..706c41c063 100644 --- a/types/TransfersResource.d.ts +++ b/types/TransfersResource.d.ts @@ -123,6 +123,13 @@ declare module 'stripe' { refund_application_fee?: boolean; } + interface TransferReversalListParams extends PaginationParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + interface TransferReversalRetrieveParams { /** * Specifies which fields in the response should be expanded. @@ -142,13 +149,6 @@ declare module 'stripe' { metadata?: Stripe.Emptyable; } - interface TransferReversalListParams extends PaginationParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - class TransfersResource { /** * To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error. @@ -208,6 +208,19 @@ declare module 'stripe' { options?: RequestOptions ): Promise>; + /** + * You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals. + */ + listReversals( + id: string, + params?: TransferReversalListParams, + options?: RequestOptions + ): ApiListPromise; + listReversals( + id: string, + options?: RequestOptions + ): ApiListPromise; + /** * By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer. */ @@ -234,19 +247,11 @@ declare module 'stripe' { params?: TransferReversalUpdateParams, options?: RequestOptions ): Promise>; - - /** - * You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals. - */ - listReversals( - id: string, - params?: TransferReversalListParams, - options?: RequestOptions - ): ApiListPromise; - listReversals( + updateReversal( + transferId: string, id: string, options?: RequestOptions - ): ApiListPromise; + ): Promise>; } } }