From 1998902a94136a91764f47f7fa8d549b1a792ed2 Mon Sep 17 00:00:00 2001 From: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> Date: Thu, 28 Jul 2022 20:43:42 +0200 Subject: [PATCH] fix(medusa-js): Use correct customer payment methods path (#1934) --- packages/medusa-js/src/resources/payment-methods.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/medusa-js/src/resources/payment-methods.ts b/packages/medusa-js/src/resources/payment-methods.ts index e72582336c..e0bb199ec0 100644 --- a/packages/medusa-js/src/resources/payment-methods.ts +++ b/packages/medusa-js/src/resources/payment-methods.ts @@ -1,4 +1,4 @@ -import { StoreCustomersListPaymentMethodsRes } from '@medusajs/medusa' +import { StoreCustomersListPaymentMethodsRes } from "@medusajs/medusa" import { ResponsePromise } from "../typings" import BaseResource from "./base" @@ -9,8 +9,10 @@ class PaymentMethodsResource extends BaseResource { * @param customHeaders * @return {StoreCustomersListPaymentMethodsRes} */ - list(id: string, customHeaders: Record = {}): ResponsePromise { - const path = `/store/carts/${id}/payment-methods` + list( + customHeaders: Record = {} + ): ResponsePromise { + const path = `/store/customers/me/payment-methods` return this.client.request("GET", path, undefined, {}, customHeaders) } }