Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5abe0e44caedb3474ee672265284096ec89e0fa3
4b8685a69ee5061fca67cc7e3fd69c8e6890b24e
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// File generated from our OpenAPI spec
package com.stripe.events;

import com.google.gson.annotations.SerializedName;
import com.stripe.exception.StripeException;
import com.stripe.model.v2.core.Account;
import com.stripe.model.v2.core.Event;
import com.stripe.model.v2.core.Event.RelatedObject;
import lombok.Getter;

@Getter
public final class V2CoreAccountIncludingFutureRequirementsUpdatedEvent extends Event {
@SerializedName("related_object")

/** Object containing the reference to API resource relevant to the event. */
RelatedObject relatedObject;

/** Retrieves the related object from the API. Make an API request on every call. */
public Account fetchRelatedObject() throws StripeException {
return (Account) super.fetchRelatedObject(this.relatedObject);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// File generated from our OpenAPI spec
package com.stripe.events;

import com.google.gson.annotations.SerializedName;
import com.stripe.exception.StripeException;
import com.stripe.model.v2.core.Account;
import com.stripe.model.v2.core.Event.RelatedObject;
import com.stripe.model.v2.core.EventNotification;
import lombok.Getter;

@Getter
public final class V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification
extends EventNotification {
@SerializedName("related_object")

/** Object containing the reference to API resource relevant to the event. */
RelatedObject relatedObject;

/** Retrieves the related object from the API. Make an API request on every call. */
public Account fetchRelatedObject() throws StripeException {
return (Account) super.fetchRelatedObject(this.relatedObject);
}
/** Retrieve the corresponding full event from the Stripe API. */
@Override
public V2CoreAccountIncludingFutureRequirementsUpdatedEvent fetchEvent() throws StripeException {
return (V2CoreAccountIncludingFutureRequirementsUpdatedEvent) super.fetchEvent();
}
}
3 changes: 3 additions & 0 deletions src/main/java/com/stripe/model/v2/EventDataClassLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ public final class EventDataClassLookup {
eventClassLookup.put(
"v2.core.account[defaults].updated",
com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEvent.class);
eventClassLookup.put(
"v2.core.account[future_requirements].updated",
com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEvent.class);
eventClassLookup.put(
"v2.core.account[identity].updated",
com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEvent.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ public final class EventNotificationClassLookup {
eventClassLookup.put(
"v2.core.account[defaults].updated",
com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEventNotification.class);
eventClassLookup.put(
"v2.core.account[future_requirements].updated",
com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.class);
eventClassLookup.put(
"v2.core.account[identity].updated",
com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEventNotification.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ public class OutboundPayment extends StripeObject implements HasId {
@SerializedName("trace_id")
TraceId traceId;

/** Information to track this OutboundPayment with the recipient bank. */
@SerializedName("tracking_details")
TrackingDetails trackingDetails;

/** The "presentment amount" for the OutboundPayment. */
@Getter
@Setter
Expand Down Expand Up @@ -183,13 +187,39 @@ public static class DeliveryOptions extends StripeObject {
@SerializedName("bank_account")
String bankAccount;

/** Delivery options for paper check. */
@SerializedName("paper_check")
PaperCheck paperCheck;

/**
* Open Enum. Speed of the payout.
*
* <p>One of {@code instant}, {@code next_business_day}, or {@code standard}.
*/
@SerializedName("speed")
String speed;

/** Delivery options for paper check. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class PaperCheck extends StripeObject {
/** Memo printed on the memo field of the check. */
@SerializedName("memo")
String memo;

/**
* Open Enum. Shipping speed of the paper check.
*
* <p>One of {@code priority}, or {@code standard}.
*/
@SerializedName("shipping_speed")
String shippingSpeed;

/** Signature for the paper check. */
@SerializedName("signature")
String signature;
}
}

/** The FinancialAccount that funds were pulled from. */
Expand Down Expand Up @@ -392,4 +422,93 @@ public static class TraceId extends StripeObject {
@SerializedName("value")
String value;
}

/** Information to track this OutboundPayment with the recipient bank. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class TrackingDetails extends StripeObject {
/** Paper check tracking details. */
@SerializedName("paper_check")
PaperCheck paperCheck;

/** Paper check tracking details. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class PaperCheck extends StripeObject {
/**
* Open Enum. Carrier of the paper check.
*
* <p>One of {@code fedex}, or {@code usps}.
*/
@SerializedName("carrier")
String carrier;

/** Check number. */
@SerializedName("check_number")
String checkNumber;

/** Postal code of the latest tracking update. */
@SerializedName("current_postal_code")
String currentPostalCode;

/** Mailing address of the paper check. */
@SerializedName("mailing_address")
MailingAddress mailingAddress;

/** Tracking number for the check. */
@SerializedName("tracking_number")
String trackingNumber;

/**
* Open Enum. Tracking status of the paper check.
*
* <p>One of {@code delivered}, {@code in_transit}, or {@code mailed}.
*/
@SerializedName("tracking_status")
String trackingStatus;

/** When the tracking details were last updated. */
@SerializedName("updated_at")
Instant updatedAt;

/** Mailing address of the paper check. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MailingAddress extends StripeObject {
/** City, district, suburb, town, or village. */
@SerializedName("city")
String city;

/**
* Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
* 3166-1 alpha-2</a>).
*/
@SerializedName("country")
String country;

/** Address line 1 (e.g., street, PO Box, or company name). */
@SerializedName("line1")
String line1;

/** Address line 2 (e.g., apartment, suite, unit, or building). */
@SerializedName("line2")
String line2;

/** ZIP or postal code. */
@SerializedName("postal_code")
String postalCode;

/** State, county, province, or region. */
@SerializedName("state")
String state;

/** Town or district. */
@SerializedName("town")
String town;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,22 @@ public static class DeliveryOptions {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map<String, Object> extraParams;

/** Delivery options for paper check. */
@SerializedName("paper_check")
PaperCheck paperCheck;

/** Open Enum. Speed of the payout. */
@SerializedName("speed")
Speed speed;

private DeliveryOptions(BankAccount bankAccount, Map<String, Object> extraParams, Speed speed) {
private DeliveryOptions(
BankAccount bankAccount,
Map<String, Object> extraParams,
PaperCheck paperCheck,
Speed speed) {
this.bankAccount = bankAccount;
this.extraParams = extraParams;
this.paperCheck = paperCheck;
this.speed = speed;
}

Expand All @@ -373,12 +382,14 @@ public static class Builder {

private Map<String, Object> extraParams;

private PaperCheck paperCheck;

private Speed speed;

/** Finalize and obtain parameter instance from this builder. */
public OutboundPaymentCreateParams.DeliveryOptions build() {
return new OutboundPaymentCreateParams.DeliveryOptions(
this.bankAccount, this.extraParams, this.speed);
this.bankAccount, this.extraParams, this.paperCheck, this.speed);
}

/** Open Enum. Method for bank account. */
Expand Down Expand Up @@ -415,13 +426,138 @@ public Builder putAllExtraParam(Map<String, Object> map) {
return this;
}

/** Delivery options for paper check. */
public Builder setPaperCheck(
OutboundPaymentCreateParams.DeliveryOptions.PaperCheck paperCheck) {
this.paperCheck = paperCheck;
return this;
}

/** Open Enum. Speed of the payout. */
public Builder setSpeed(OutboundPaymentCreateParams.DeliveryOptions.Speed speed) {
this.speed = speed;
return this;
}
}

@Getter
@EqualsAndHashCode(callSuper = false)
public static class PaperCheck {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map<String, Object> extraParams;

/** Memo printed on the memo field of the check. */
@SerializedName("memo")
String memo;

/** Open Enum. Shipping speed of the paper check. Defaults to standard. */
@SerializedName("shipping_speed")
ShippingSpeed shippingSpeed;

/** <strong>Required.</strong> Signature for the paper check. */
@SerializedName("signature")
String signature;

private PaperCheck(
Map<String, Object> extraParams,
String memo,
ShippingSpeed shippingSpeed,
String signature) {
this.extraParams = extraParams;
this.memo = memo;
this.shippingSpeed = shippingSpeed;
this.signature = signature;
}

public static Builder builder() {
return new Builder();
}

public static class Builder {
private Map<String, Object> extraParams;

private String memo;

private ShippingSpeed shippingSpeed;

private String signature;

/** Finalize and obtain parameter instance from this builder. */
public OutboundPaymentCreateParams.DeliveryOptions.PaperCheck build() {
return new OutboundPaymentCreateParams.DeliveryOptions.PaperCheck(
this.extraParams, this.memo, this.shippingSpeed, this.signature);
}

/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link OutboundPaymentCreateParams.DeliveryOptions.PaperCheck#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}

/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link OutboundPaymentCreateParams.DeliveryOptions.PaperCheck#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map<String, Object> map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}

/** Memo printed on the memo field of the check. */
public Builder setMemo(String memo) {
this.memo = memo;
return this;
}

/** Open Enum. Shipping speed of the paper check. Defaults to standard. */
public Builder setShippingSpeed(
OutboundPaymentCreateParams.DeliveryOptions.PaperCheck.ShippingSpeed shippingSpeed) {
this.shippingSpeed = shippingSpeed;
return this;
}

/** <strong>Required.</strong> Signature for the paper check. */
public Builder setSignature(String signature) {
this.signature = signature;
return this;
}
}

public enum ShippingSpeed implements ApiRequestParams.EnumParam {
@SerializedName("priority")
PRIORITY("priority"),

@SerializedName("standard")
STANDARD("standard");

@Getter(onMethod_ = {@Override})
private final String value;

ShippingSpeed(String value) {
this.value = value;
}
}
}

public enum BankAccount implements ApiRequestParams.EnumParam {
@SerializedName("automatic")
AUTOMATIC("automatic"),
Expand Down
Loading
Loading