Skip to content

Commit

Permalink
Codegen for openapi v213 (#1487)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe committed Dec 8, 2022
1 parent 431d4cf commit 1c3d1f3
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 6 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v212
v213
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public class Charge extends ApiResource implements MetadataStore<Charge>, Balanc

/**
* Error code explaining reason for charge failure if available (see <a
* href="https://stripe.com/docs/api#errors">the errors section</a> for a list of codes).
* href="https://stripe.com/docs/error-codes">the errors section</a> for a list of codes).
*/
@SerializedName("failure_code")
String failureCode;
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/stripe/model/Customer.java
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,11 @@ public static CustomerCollection list(CustomerListParams params, RequestOptions
return ApiResource.requestCollection(url, params, CustomerCollection.class, options);
}

/** Returns a list of PaymentMethods for a given Customer. */
public PaymentMethodCollection listPaymentMethods() throws StripeException {
return listPaymentMethods((Map<String, Object>) null, (RequestOptions) null);
}

/** Returns a list of PaymentMethods for a given Customer. */
public PaymentMethodCollection listPaymentMethods(Map<String, Object> params)
throws StripeException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ public class CustomerListPaymentMethodsParams extends ApiRequestParams {
@SerializedName("starting_after")
String startingAfter;

/** A required filter on the list, based on the object {@code type} field. */
/**
* An optional filter on the list, based on the object {@code type} field. Without the filter, the
* list includes all current and future payment method types. If your integration expects only one
* type of payment method in the response, make sure to provide a type value in the request.
*/
@SerializedName("type")
Type type;

Expand Down Expand Up @@ -179,7 +183,12 @@ public Builder setStartingAfter(String startingAfter) {
return this;
}

/** A required filter on the list, based on the object {@code type} field. */
/**
* An optional filter on the list, based on the object {@code type} field. Without the filter,
* the list includes all current and future payment method types. If your integration expects
* only one type of payment method in the response, make sure to provide a type value in the
* request.
*/
public Builder setType(CustomerListPaymentMethodsParams.Type type) {
this.type = type;
return this;
Expand Down
13 changes: 11 additions & 2 deletions src/main/java/com/stripe/param/PaymentMethodListParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ public class PaymentMethodListParams extends ApiRequestParams {
@SerializedName("starting_after")
String startingAfter;

/** A required filter on the list, based on the object {@code type} field. */
/**
* An optional filter on the list, based on the object {@code type} field. Without the filter, the
* list includes all current and future payment method types. If your integration expects only one
* type of payment method in the response, make sure to provide a type value in the request.
*/
@SerializedName("type")
Type type;

Expand Down Expand Up @@ -194,7 +198,12 @@ public Builder setStartingAfter(String startingAfter) {
return this;
}

/** A required filter on the list, based on the object {@code type} field. */
/**
* An optional filter on the list, based on the object {@code type} field. Without the filter,
* the list includes all current and future payment method types. If your integration expects
* only one type of payment method in the response, make sure to provide a type value in the
* request.
*/
public Builder setType(PaymentMethodListParams.Type type) {
this.type = type;
return this;
Expand Down

0 comments on commit 1c3d1f3

Please sign in to comment.