Skip to content

Commit

Permalink
Merge pull request #516 from stripe/ob-514
Browse files Browse the repository at this point in the history
Fix `stripeMethod` documentation, remove `required` parameter
  • Loading branch information
ob-stripe authored Nov 5, 2018
2 parents a80088d + 3e5d414 commit e82286e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 21 deletions.
2 changes: 1 addition & 1 deletion lib/StripeMethod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions lib/resources/Orders.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 1 addition & 7 deletions lib/resources/Products.js
Original file line number Diff line number Diff line change
@@ -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'],
}),

});
8 changes: 1 addition & 7 deletions lib/resources/SKUs.js
Original file line number Diff line number Diff line change
@@ -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'],
}),

});

0 comments on commit e82286e

Please sign in to comment.