From 373f67a1173630bafd43cdf602344ea5229e9789 Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Tue, 24 Sep 2019 17:27:53 +0700 Subject: [PATCH] Added getCustomer method to stripe no-issue This uses the stripeRequests module directly since the customers api was removed. --- ghost/members-api/lib/stripe/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ghost/members-api/lib/stripe/index.js b/ghost/members-api/lib/stripe/index.js index fcb2237a44..bfb435d687 100644 --- a/ghost/members-api/lib/stripe/index.js +++ b/ghost/members-api/lib/stripe/index.js @@ -1,3 +1,4 @@ +const {retrieve, create} = require('./api/stripeRequests'); const api = require('./api'); module.exports = class StripePaymentProcessor { @@ -82,4 +83,8 @@ module.exports = class StripePaymentProcessor { return session; } + + async getCustomer(id) { + return retrieve(this._stripe, 'customers', id); + } };