Skip to content

Commit 49a6a12

Browse files
authored
Adds generated Customer retrievePaymentMethod overload (#2002)
* adds Customer retrievePaymentMethod overload that takes payment method id and request options * remove retrieve special case from allNonDeprecatedMethodsTakeOptions
1 parent 3da9579 commit 49a6a12

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/main/java/com/stripe/model/Customer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,12 @@ public PaymentMethod retrievePaymentMethod(String paymentMethod) throws StripeEx
657657
return retrievePaymentMethod(paymentMethod, (Map<String, Object>) null, (RequestOptions) null);
658658
}
659659

660+
/** Retrieves a PaymentMethod object for a given Customer. */
661+
public PaymentMethod retrievePaymentMethod(String paymentMethod, RequestOptions options)
662+
throws StripeException {
663+
return retrievePaymentMethod(paymentMethod, (Map<String, Object>) null, options);
664+
}
665+
660666
/** Retrieves a PaymentMethod object for a given Customer. */
661667
public PaymentMethod retrievePaymentMethod(String paymentMethod, Map<String, Object> params)
662668
throws StripeException {

src/test/java/com/stripe/model/StandardizationTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,6 @@ public void allNonDeprecatedMethodsTakeOptions() throws IOException, NoSuchMetho
8787
continue;
8888
}
8989

90-
// Skip `public static Foo retrieve(String id) {...` helper methods
91-
if (String.class.equals(finalParamType)
92-
&& parameters.size() == 1
93-
&& method.getName().startsWith("retrieve")) {
94-
continue;
95-
}
96-
9790
// Skip the `public static Card createCard(String id) {...` helper method on Customer.
9891
if (String.class.equals(finalParamType)
9992
&& parameters.size() == 1

0 commit comments

Comments
 (0)