Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code for beta #1575

Merged
merged 3 commits into from
Jun 1, 2023
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 OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v358
v369
28 changes: 24 additions & 4 deletions src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,18 @@ public static class BankTransfer extends StripeObject {

/**
* The funding method type used to fund the customer balance. Permitted values include: {@code
* eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, or {@code
* mx_bank_transfer}.
* eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, {@code
* mx_bank_transfer}, or {@code us_bank_transfer}.
*
* <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, or
* {@code mx_bank_transfer}.
* <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer},
* {@code mx_bank_transfer}, or {@code us_bank_transfer}.
*/
@SerializedName("type")
String type;

@SerializedName("us_bank_transfer")
UsBankTransfer usBankTransfer;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -229,6 +232,23 @@ public static class JpBankTransfer extends StripeObject {
@SerializedName("sender_name")
String senderName;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class UsBankTransfer extends StripeObject {
/**
* The banking network used for this funding.
*
* <p>One of {@code ach}, {@code domestic_wire_us}, or {@code swift}.
*/
@SerializedName("network")
String network;

/** The full name of the sender, as supplied by the sending bank. */
@SerializedName("sender_name")
String senderName;
}
}
}

Expand Down
37 changes: 35 additions & 2 deletions src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,10 @@ public class Invoice extends ApiResource implements HasId, MetadataStore<Invoice
@Setter(lombok.AccessLevel.NONE)
ExpandableField<Subscription> subscription;

/** Details about the subscription that created this invoice. */
@SerializedName("subscription_details")
SubscriptionDetails subscriptionDetails;

/**
* Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
*/
Expand Down Expand Up @@ -1986,8 +1990,8 @@ public static class BankTransfer extends StripeObject {

/**
* The bank transfer type that can be used for funding. Permitted values include: {@code
* eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, or {@code
* mx_bank_transfer}.
* eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, {@code
* mx_bank_transfer}, or {@code us_bank_transfer}.
*/
@SerializedName("type")
String type;
Expand Down Expand Up @@ -2162,6 +2166,35 @@ public static class StatusTransitions extends StripeObject {
Long voidedAt;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SubscriptionDetails extends StripeObject {
/** If specified, payment collection for this subscription will be paused. */
@SerializedName("pause_collection")
PauseCollection pauseCollection;

/**
* The Pause Collection settings determine how we will pause collection for this subscription
* and for how long the subscription should be paused.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class PauseCollection extends StripeObject {
/**
* The payment collection behavior for this subscription while paused. One of {@code
* keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
*/
@SerializedName("behavior")
String behavior;

/** The time after which the subscription will resume collecting payments. */
@SerializedName("resumes_at")
Long resumesAt;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/model/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -1105,10 +1105,10 @@ public static class BankTransfer extends StripeObject {
/**
* The bank transfer type that this PaymentIntent is allowed to use for funding
* Permitted values include: {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code
* jp_bank_transfer}, or {@code mx_bank_transfer}.
* jp_bank_transfer}, {@code mx_bank_transfer}, or {@code us_bank_transfer}.
*
* <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code
* jp_bank_transfer}, or {@code mx_bank_transfer}.
* jp_bank_transfer}, {@code mx_bank_transfer}, or {@code us_bank_transfer}.
*/
@SerializedName("type")
String type;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -1645,8 +1645,8 @@ public static class DisplayBankTransferInstructions extends StripeObject {
/**
* Type of bank transfer
*
* <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, or
* {@code mx_bank_transfer}.
* <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer},
* {@code mx_bank_transfer}, or {@code us_bank_transfer}.
*/
@SerializedName("type")
String type;
Expand Down Expand Up @@ -2823,10 +2823,10 @@ public static class BankTransfer extends StripeObject {
/**
* The bank transfer type that this PaymentIntent is allowed to use for funding Permitted
* values include: {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code
* jp_bank_transfer}, or {@code mx_bank_transfer}.
* jp_bank_transfer}, {@code mx_bank_transfer}, or {@code us_bank_transfer}.
*
* <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer},
* or {@code mx_bank_transfer}.
* {@code mx_bank_transfer}, or {@code us_bank_transfer}.
*/
@SerializedName("type")
String type;
Expand Down
49 changes: 49 additions & 0 deletions src/main/java/com/stripe/model/PaymentMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,13 @@ public static class CardPresent extends StripeObject {
@SerializedName("country")
String country;

/**
* A high-level description of the type of cards issued in this range. (For internal use only
* and not typically available in standard API requests.)
*/
@SerializedName("description")
String description;

/** Two-digit number representing the card's expiration month. */
@SerializedName("exp_month")
Long expMonth;
Expand All @@ -1022,6 +1029,20 @@ public static class CardPresent extends StripeObject {
@SerializedName("funding")
String funding;

/**
* Issuer identification number of the card. (For internal use only and not typically available
* in standard API requests.)
*/
@SerializedName("iin")
String iin;

/**
* The name of the card's issuing bank. (For internal use only and not typically available in
* standard API requests.)
*/
@SerializedName("issuer")
String issuer;

/** The last four digits of the card. */
@SerializedName("last4")
String last4;
Expand Down Expand Up @@ -1174,6 +1195,13 @@ public static class InteracPresent extends StripeObject {
@SerializedName("country")
String country;

/**
* A high-level description of the type of cards issued in this range. (For internal use only
* and not typically available in standard API requests.)
*/
@SerializedName("description")
String description;

/** Two-digit number representing the card's expiration month. */
@SerializedName("exp_month")
Long expMonth;
Expand All @@ -1200,6 +1228,20 @@ public static class InteracPresent extends StripeObject {
@SerializedName("funding")
String funding;

/**
* Issuer identification number of the card. (For internal use only and not typically available
* in standard API requests.)
*/
@SerializedName("iin")
String iin;

/**
* The name of the card's issuing bank. (For internal use only and not typically available in
* standard API requests.)
*/
@SerializedName("issuer")
String issuer;

/** The last four digits of the card. */
@SerializedName("last4")
String last4;
Expand Down Expand Up @@ -1327,6 +1369,13 @@ public static class Paypal extends StripeObject {
@SerializedName("fingerprint")
String fingerprint;

/**
* Owner's email. Values are provided by PayPal directly (if supported) at the time of
* authorization or settlement. They cannot be set or mutated.
*/
@SerializedName("payer_email")
String payerEmail;

/** PayPal account PayerID. This identifier uniquely identifies the PayPal customer. */
@SerializedName("payer_id")
String payerId;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/stripe/model/Quote.java
Original file line number Diff line number Diff line change
Expand Up @@ -1799,8 +1799,8 @@ public static class BillFrom extends StripeObject {
/**
* The type of method to specify the {@code bill_from} time.
*
* <p>One of {@code line_starts_at}, {@code now}, {@code quote_acceptance_date}, or {@code
* timestamp}.
* <p>One of {@code line_starts_at}, {@code now}, {@code pause_collection_start}, {@code
* quote_acceptance_date}, or {@code timestamp}.
*/
@SerializedName("type")
String type;
Expand Down Expand Up @@ -1998,8 +1998,8 @@ public static class BillFrom extends StripeObject {
/**
* The type of method to specify the {@code bill_from} time.
*
* <p>One of {@code line_starts_at}, {@code now}, {@code quote_acceptance_date}, or {@code
* timestamp}.
* <p>One of {@code line_starts_at}, {@code now}, {@code pause_collection_start}, {@code
* quote_acceptance_date}, or {@code timestamp}.
*/
@SerializedName("type")
String type;
Expand Down
38 changes: 38 additions & 0 deletions src/main/java/com/stripe/model/QuoteLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ public class QuoteLine extends StripeObject implements HasId {
@SerializedName("proration_behavior")
String prorationBehavior;

/** Details to modify the pause_collection behavior of the subscription schedule. */
@SerializedName("set_pause_collection")
SetPauseCollection setPauseCollection;

/**
* Timestamp helper to end the underlying schedule early, based on the acompanying line's start or
* end date.
Expand Down Expand Up @@ -781,6 +785,40 @@ public static class Duration extends StripeObject {
}
}

/** Configures the pause collection settings for a subscription during a phase. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SetPauseCollection extends StripeObject {
/** If specified, payment collection for this subscription will be paused. */
@SerializedName("set")
Set set;

/**
* Defines the type of the pause_collection behavior for the quote line.
*
* <p>One of {@code remove}, or {@code set}.
*/
@SerializedName("type")
String type;

/**
* The Pause Collection settings specify how to pause collection for a subscription during a
* phase by modifying the behavior of the invoices that are generated during the paused period.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Set extends StripeObject {
/**
* The payment collection behavior for this subscription while paused. One of {@code
* keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
*/
@SerializedName("behavior")
String behavior;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
29 changes: 27 additions & 2 deletions src/main/java/com/stripe/model/StripeError.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,35 @@ public class StripeError extends StripeObject {
@SerializedName("developer_message")
String developerMessage;

@SerializedName("user_message")
String userMessage;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class InvalidField {
@SerializedName("field")
String field;

@SerializedName("message")
String message;
}

@SerializedName("invalid_fields")
java.util.List<InvalidField> invalidFields;

public String getMessage() {
String fieldMessage = "";
if (this.invalidFields != null) {
fieldMessage +=
"Fields: "
+ this.invalidFields.stream()
.map((x) -> x.getField() + " (" + x.getMessage() + ")")
.collect(java.util.stream.Collectors.joining(", "));
}
if (this.message == null) {
return this.developerMessage;
return this.developerMessage + fieldMessage;
}
return this.message;
return this.message + fieldMessage;
}
}
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/model/Subscription.java
Original file line number Diff line number Diff line change
Expand Up @@ -1326,8 +1326,8 @@ public static class BankTransfer extends StripeObject {

/**
* The bank transfer type that can be used for funding. Permitted values include: {@code
* eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, or {@code
* mx_bank_transfer}.
* eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, {@code
* mx_bank_transfer}, or {@code us_bank_transfer}.
*/
@SerializedName("type")
String type;
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/com/stripe/model/SubscriptionSchedule.java
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,10 @@ public static class Phase extends StripeObject {
@Setter(lombok.AccessLevel.NONE)
ExpandableField<Account> onBehalfOf;

/** If specified, payment collection for this subscription will be paused. */
@SerializedName("pause_collection")
PauseCollection pauseCollection;

/**
* If the subscription schedule will prorate when transitioning to this phase. Possible values
* are {@code create_prorations} and {@code none}.
Expand Down Expand Up @@ -1489,6 +1493,22 @@ public static class Trial extends StripeObject {
}
}

/**
* The Pause Collection settings specify how to pause collection for a subscription during a
* phase by modifying the behavior of the invoices that are generated during the paused period.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class PauseCollection extends StripeObject {
/**
* The payment collection behavior for this subscription while paused. One of {@code
* keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
*/
@SerializedName("behavior")
String behavior;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
Loading
Loading