From c740270fe85ace7b091d5f704ebebf171a35db41 Mon Sep 17 00:00:00 2001 From: richardonrails Date: Thu, 28 Jun 2018 22:49:57 -0400 Subject: [PATCH] Set old Stripe API version so pagination isn't broken --- lib/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 73532e1..ce926eb 100644 --- a/lib/index.js +++ b/lib/index.js @@ -26,6 +26,7 @@ function Cohorter (key, options) { if (!(this instanceof Cohorter)) return new Cohorter(key, options); if (!key) throw new Error('Stripe cohort requires a Stripe key.'); this.stripe = Stripe(key); + this.stripe.setApiVersion('2014-03-13'); this.options = defaults(options, { count: 100, concurrency: 1 }); var self = this; return function () { self.cohort.apply(self, arguments); }; @@ -114,4 +115,4 @@ Cohorter.prototype.query = function (start, end, offset, callback) { debug('loaded %d customers with offset %d', customers.length, offset); callback(null, res); }); -}; \ No newline at end of file +};