Skip to content

Commit

Permalink
Update generated code (#1797)
Browse files Browse the repository at this point in the history
* Update generated code for v1010

* Update generated code for v1011

* Update generated code for v1012

* Update generated code for v1013

* Update generated code for v1014

* Update generated code for v1015

* Update generated code for v1016

* Update generated code for v1016

* Update generated code for v1017

* Update generated code for v1019

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] committed May 9, 2024
1 parent f9f9981 commit 2975a17
Show file tree
Hide file tree
Showing 28 changed files with 1,348 additions and 53 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1008
v1019
4 changes: 3 additions & 1 deletion src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ public class Account extends ApiResource implements MetadataStore<Account>, Paym

/**
* Whether account details have been submitted. Accounts with Stripe Dashboard access, which
* includes Standard accounts, cannot receive payouts before this is true.
* includes Standard accounts, cannot receive payouts before this is true. Accounts where this is
* false should be directed to <a href="https://stripe.com/connect/onboarding">an onboarding
* flow</a> to finish submitting account details.
*/
@SerializedName("details_submitted")
Boolean detailsSubmitted;
Expand Down
13 changes: 5 additions & 8 deletions src/main/java/com/stripe/model/Capability.java
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ public static class Requirements extends StripeObject {
List<String> currentlyDue;

/**
* If the capability is disabled, this string describes why. Can be {@code
* requirements.fields_needed}, {@code pending.onboarding}, {@code pending.review}, {@code
* rejected.fraud}, {@code rejected.other}, {@code platform_paused}, {@code
* action_required.requested_capabilities}, {@code rejected.inactivty}, or {@code
* rejected.unsupported_business}.
* If the capability is disabled, this string describes why. <a
* href="https://stripe.com/docs/connect/handling-api-verification">Learn more about handling
* verification issues</a>. Can be {@code requirements.fields_needed}, {@code
* pending.onboarding}, {@code pending.review}, {@code rejected.other}, {@code platform_paused},
* {@code rejected.inactivty}, or {@code rejected.unsupported_business}.
*
* <p>{@code rejected.unsupported_business} means that the account's business is not supported
* by the capability. For example, payment methods may restrict the businesses they support in
Expand All @@ -348,9 +348,6 @@ public static class Requirements extends StripeObject {
* disabled reason currently only applies to the Issuing capability. See <a
* href="https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts">Issuing:
* Managing Inactive Connects</a> for more details.
*
* <p>If you believe that a rejection is in error, please contact support at
* https://support.stripe.com/contact/ for assistance.
*/
@SerializedName("disabled_reason")
String disabledReason;
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/stripe/model/ConfirmationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,17 @@ public static class PaymentMethodPreview extends StripeObject {
@SerializedName("alipay")
Alipay alipay;

/**
* This field indicates whether this payment method can be shown again to its customer in a
* checkout flow. Stripe products such as Checkout and Elements use this field to determine
* whether a payment method can be shown as a saved payment method in a checkout flow. The field
* defaults to “unspecified”.
*
* <p>One of {@code always}, {@code limited}, or {@code unspecified}.
*/
@SerializedName("allow_redisplay")
String allowRedisplay;

@SerializedName("amazon_pay")
AmazonPay amazonPay;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

public class CreditNoteLineItemCollection extends StripeCollection<CreditNoteLineItem> {
/**
* When retrieving a credit note, you’ll get a <strong>lines</strong> property containing the the
* When retrieving a credit note, you’ll get a <strong>lines</strong> property containing the
* first handful of those items. There is also a URL where you can retrieve the full (paginated)
* list of line items.
*/
Expand All @@ -22,7 +22,7 @@ public CreditNoteLineItemCollection list(Map<String, Object> params) throws Stri
}

/**
* When retrieving a credit note, you’ll get a <strong>lines</strong> property containing the the
* When retrieving a credit note, you’ll get a <strong>lines</strong> property containing the
* first handful of those items. There is also a URL where you can retrieve the full (paginated)
* list of line items.
*/
Expand All @@ -36,7 +36,7 @@ public CreditNoteLineItemCollection list(Map<String, Object> params, RequestOpti
}

/**
* When retrieving a credit note, you’ll get a <strong>lines</strong> property containing the the
* When retrieving a credit note, you’ll get a <strong>lines</strong> property containing the
* first handful of those items. There is also a URL where you can retrieve the full (paginated)
* list of line items.
*/
Expand All @@ -46,7 +46,7 @@ public CreditNoteLineItemCollection list(CreditNoteLineItemCollectionListParams
}

/**
* When retrieving a credit note, you’ll get a <strong>lines</strong> property containing the the
* When retrieving a credit note, you’ll get a <strong>lines</strong> property containing the
* first handful of those items. There is also a URL where you can retrieve the full (paginated)
* list of line items.
*/
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/com/stripe/model/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,14 @@ public class Event extends ApiResource implements HasId {
* treasury.outbound_payment.canceled}, {@code treasury.outbound_payment.created}, {@code
* treasury.outbound_payment.expected_arrival_date_updated}, {@code
* treasury.outbound_payment.failed}, {@code treasury.outbound_payment.posted}, {@code
* treasury.outbound_payment.returned}, {@code treasury.outbound_transfer.canceled}, {@code
* treasury.outbound_transfer.created}, {@code
* treasury.outbound_payment.returned}, {@code
* treasury.outbound_payment.tracking_details_updated}, {@code
* treasury.outbound_transfer.canceled}, {@code treasury.outbound_transfer.created}, {@code
* treasury.outbound_transfer.expected_arrival_date_updated}, {@code
* treasury.outbound_transfer.failed}, {@code treasury.outbound_transfer.posted}, {@code
* treasury.outbound_transfer.returned}, {@code treasury.received_credit.created}, {@code
* treasury.received_credit.failed}, {@code treasury.received_credit.succeeded}, or {@code
* treasury.outbound_transfer.returned}, {@code
* treasury.outbound_transfer.tracking_details_updated}, {@code treasury.received_credit.created},
* {@code treasury.received_credit.failed}, {@code treasury.received_credit.succeeded}, or {@code
* treasury.received_debit.created}.
*/
@SerializedName("type")
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/stripe/model/PaymentMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
@SerializedName("alipay")
Alipay alipay;

/**
* This field indicates whether this payment method can be shown again to its customer in a
* checkout flow. Stripe products such as Checkout and Elements use this field to determine
* whether a payment method can be shown as a saved payment method in a checkout flow. The field
* defaults to “unspecified”.
*
* <p>One of {@code always}, {@code limited}, or {@code unspecified}.
*/
@SerializedName("allow_redisplay")
String allowRedisplay;

@SerializedName("amazon_pay")
AmazonPay amazonPay;

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/stripe/model/checkout/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -2477,7 +2477,8 @@ public static class SavedPaymentMethodOptions extends StripeObject {
List<String> allowRedisplayFilters;

/**
* Enable customers to choose if they wish to save their payment method for future use.
* Enable customers to choose if they wish to save their payment method for future use. Disabled
* by default.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
Expand Down
105 changes: 105 additions & 0 deletions src/main/java/com/stripe/model/treasury/OutboundPayment.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.stripe.param.treasury.OutboundPaymentPostParams;
import com.stripe.param.treasury.OutboundPaymentRetrieveParams;
import com.stripe.param.treasury.OutboundPaymentReturnOutboundPaymentParams;
import com.stripe.param.treasury.OutboundPaymentUpdateParams;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
Expand Down Expand Up @@ -158,6 +159,10 @@ public class OutboundPayment extends ApiResource implements HasId {
@SerializedName("status_transitions")
StatusTransitions statusTransitions;

/** Details about network-specific tracking information if available. */
@SerializedName("tracking_details")
TrackingDetails trackingDetails;

/** The Transaction associated with this object. */
@SerializedName("transaction")
@Getter(lombok.AccessLevel.NONE)
Expand Down Expand Up @@ -566,6 +571,51 @@ public static class StatusTransitions extends StripeObject {
Long returnedAt;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class TrackingDetails extends StripeObject {
@SerializedName("ach")
Ach ach;

/**
* The US bank account network used to send funds.
*
* <p>One of {@code ach}, or {@code us_domestic_wire}.
*/
@SerializedName("type")
String type;

@SerializedName("us_domestic_wire")
UsDomesticWire usDomesticWire;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Ach extends StripeObject {
/** ACH trace ID of the OutboundPayment for payments sent over the {@code ach} network. */
@SerializedName("trace_id")
String traceId;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class UsDomesticWire extends StripeObject {
/**
* IMAD of the OutboundPayment for payments sent over the {@code us_domestic_wire} network.
*/
@SerializedName("imad")
String imad;

/**
* OMAD of the OutboundPayment for payments sent over the {@code us_domestic_wire} network.
*/
@SerializedName("omad")
String omad;
}
}

public TestHelpers getTestHelpers() {
return new TestHelpers(this);
}
Expand All @@ -577,6 +627,60 @@ private TestHelpers(OutboundPayment resource) {
this.resource = resource;
}

/**
* Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must
* not be cancelable, and cannot be in the {@code canceled} or {@code failed} states.
*/
public OutboundPayment update(Map<String, Object> params) throws StripeException {
return update(params, (RequestOptions) null);
}

/**
* Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must
* not be cancelable, and cannot be in the {@code canceled} or {@code failed} states.
*/
public OutboundPayment update(Map<String, Object> params, RequestOptions options)
throws StripeException {
String path =
String.format(
"/v1/test_helpers/treasury/outbound_payments/%s",
ApiResource.urlEncodeId(this.resource.getId()));
ApiRequest request =
new ApiRequest(
BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options, ApiMode.V1);
return resource.getResponseGetter().request(request, OutboundPayment.class);
}

/**
* Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must
* not be cancelable, and cannot be in the {@code canceled} or {@code failed} states.
*/
public OutboundPayment update(OutboundPaymentUpdateParams params) throws StripeException {
return update(params, (RequestOptions) null);
}

/**
* Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must
* not be cancelable, and cannot be in the {@code canceled} or {@code failed} states.
*/
public OutboundPayment update(OutboundPaymentUpdateParams params, RequestOptions options)
throws StripeException {
String path =
String.format(
"/v1/test_helpers/treasury/outbound_payments/%s",
ApiResource.urlEncodeId(this.resource.getId()));
ApiResource.checkNullTypedParams(path, params);
ApiRequest request =
new ApiRequest(
BaseAddress.API,
ApiResource.RequestMethod.POST,
path,
ApiRequestParams.paramsToMap(params),
options,
ApiMode.V1);
return resource.getResponseGetter().request(request, OutboundPayment.class);
}

/**
* Transitions a test mode created OutboundPayment to the {@code failed} status. The
* OutboundPayment must already be in the {@code processing} state.
Expand Down Expand Up @@ -798,6 +902,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(endUserDetails, responseGetter);
trySetResponseGetter(returnedDetails, responseGetter);
trySetResponseGetter(statusTransitions, responseGetter);
trySetResponseGetter(trackingDetails, responseGetter);
trySetResponseGetter(transaction, responseGetter);
}
}

0 comments on commit 2975a17

Please sign in to comment.