From 3e5d4144745fb8aab79ff1e2ffb3f83e084073f6 Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Mon, 5 Nov 2018 10:49:11 +0100 Subject: [PATCH] Fix stripeMethod documentation, remove required parameter --- lib/StripeMethod.js | 2 +- lib/resources/Orders.js | 7 +------ lib/resources/Products.js | 8 +------- lib/resources/SKUs.js | 8 +------- 4 files changed, 4 insertions(+), 21 deletions(-) diff --git a/lib/StripeMethod.js b/lib/StripeMethod.js index b8302a5486..74bdfae7d5 100644 --- a/lib/StripeMethod.js +++ b/lib/StripeMethod.js @@ -10,7 +10,7 @@ var makeAutoPaginationMethods = require('./autoPagination').makeAutoPaginationMe * @param [spec.method='GET'] Request Method (POST, GET, DELETE, PUT) * @param [spec.path=''] Path to be appended to the API BASE_PATH, joined with * the instance's path (e.g. 'charges' or 'customers') - * @param [spec.required=[]] Array of required arguments in the order that they + * @param [spec.urlParams=[]] Array of required arguments in the order that they * must be passed by the consumer of the API. Subsequent optional arguments are * optionally passed through a hash (Object) as the penultimate argument * (preceding the also-optional callback argument diff --git a/lib/resources/Orders.js b/lib/resources/Orders.js index 6185b76158..0e32b3fdca 100644 --- a/lib/resources/Orders.js +++ b/lib/resources/Orders.js @@ -8,14 +8,9 @@ module.exports = StripeResource.extend({ path: 'orders', includeBasic: [ - 'list', 'retrieve', 'update', + 'create', 'list', 'retrieve', 'update', ], - create: stripeMethod({ - method: 'POST', - required: ['currency'], - }), - pay: stripeMethod({ method: 'POST', path: '/{orderId}/pay', diff --git a/lib/resources/Products.js b/lib/resources/Products.js index ac1e38eb59..d8bcedef5c 100644 --- a/lib/resources/Products.js +++ b/lib/resources/Products.js @@ -1,19 +1,13 @@ 'use strict'; var StripeResource = require('../StripeResource'); -var stripeMethod = StripeResource.method; module.exports = StripeResource.extend({ path: 'products', includeBasic: [ - 'list', 'retrieve', 'update', 'del', + 'create', 'list', 'retrieve', 'update', 'del', ], - create: stripeMethod({ - method: 'POST', - required: ['name'], - }), - }); diff --git a/lib/resources/SKUs.js b/lib/resources/SKUs.js index 5688ec8450..0364ed4ed2 100644 --- a/lib/resources/SKUs.js +++ b/lib/resources/SKUs.js @@ -1,19 +1,13 @@ 'use strict'; var StripeResource = require('../StripeResource'); -var stripeMethod = StripeResource.method; module.exports = StripeResource.extend({ path: 'skus', includeBasic: [ - 'list', 'retrieve', 'update', 'del', + 'create', 'list', 'retrieve', 'update', 'del', ], - create: stripeMethod({ - method: 'POST', - required: ['currency', 'inventory', 'price', 'product'], - }), - });