Skip to content

Commit

Permalink
Update generated code for beta (#1545)
Browse files Browse the repository at this point in the history
* Update generated code for v296

* Update generated code for v296

* Update generated code for v297

* Update generated code for v298

* Update generated code (#1544)

* Update generated code for v294

* Update generated code for v296

* Update generated code for v298

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] committed Apr 13, 2023
1 parent 1658816 commit 64e6d27
Show file tree
Hide file tree
Showing 14 changed files with 857 additions and 8 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v294
v298
3 changes: 1 addition & 2 deletions src/main/java/com/stripe/ApiVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
package com.stripe;

final class ApiVersion {
public static final String CURRENT =
"2022-11-15; embedded_connect_beta=v1; server_side_confirmation_beta=v1; orders_beta=v4; gift_cards_beta=v1; tax_calc_beta=v3; tax_txns_beta=v2; tax_regs_beta=v1; unified_accounts_beta=v1; terminal_collect_inputs_beta=v1; financial_connections_transactions_beta=v1";
public static final String CURRENT = "2022-11-15";
}
9 changes: 9 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,15 @@ public static class Capabilities extends StripeObject {
@SerializedName("paynow_payments")
String paynowPayments;

/**
* The status of the PayPal payments capability of the account, or whether the account can
* directly process PayPal charges.
*
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
*/
@SerializedName("paypal_payments")
String paypalPayments;

/**
* The status of the promptpay payments capability of the account, or whether the account can
* directly process promptpay charges.
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,8 @@ public static class Ideal extends StripeObject {
*
* <p>One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code
* FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code
* RABONL2U}, {@code RBRBNL21}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}.
* RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or
* {@code TRIONL2U}.
*/
@SerializedName("bic")
String bic;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/stripe/model/PaymentMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,8 @@ public static class Ideal extends StripeObject {
*
* <p>One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code
* FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code
* RABONL2U}, {@code RBRBNL21}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}.
* RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code
* TRIONL2U}.
*/
@SerializedName("bic")
String bic;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/stripe/model/SetupAttempt.java
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,8 @@ public static class Ideal extends StripeObject {
*
* <p>One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code
* FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code
* RABONL2U}, {@code RBRBNL21}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}.
* RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or
* {@code TRIONL2U}.
*/
@SerializedName("bic")
String bic;
Expand Down
220 changes: 218 additions & 2 deletions src/main/java/com/stripe/model/terminal/Reader.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
import com.stripe.model.HasId;
import com.stripe.model.MetadataStore;
import com.stripe.model.PaymentIntent;
import com.stripe.model.PaymentMethod;
import com.stripe.model.Refund;
import com.stripe.model.SetupIntent;
import com.stripe.model.StripeObject;
import com.stripe.net.ApiResource;
import com.stripe.net.RequestOptions;
import com.stripe.param.terminal.ReaderCancelActionParams;
import com.stripe.param.terminal.ReaderCollectInputsParams;
import com.stripe.param.terminal.ReaderCollectPaymentMethodParams;
import com.stripe.param.terminal.ReaderConfirmPaymentIntentParams;
import com.stripe.param.terminal.ReaderCreateParams;
import com.stripe.param.terminal.ReaderListParams;
import com.stripe.param.terminal.ReaderPresentPaymentMethodParams;
Expand Down Expand Up @@ -207,6 +210,92 @@ public Reader collectInputs(ReaderCollectInputsParams params, RequestOptions opt
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Reader.class, options);
}

/**
* Initiates a payment flow on a Reader and updates the PaymentIntent with card details before
* manual confirmation.
*/
public Reader collectPaymentMethod(Map<String, Object> params) throws StripeException {
return collectPaymentMethod(params, (RequestOptions) null);
}

/**
* Initiates a payment flow on a Reader and updates the PaymentIntent with card details before
* manual confirmation.
*/
public Reader collectPaymentMethod(Map<String, Object> params, RequestOptions options)
throws StripeException {
String url =
ApiResource.fullUrl(
Stripe.getApiBase(),
options,
String.format(
"/v1/terminal/readers/%s/collect_payment_method",
ApiResource.urlEncodeId(this.getId())));
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Reader.class, options);
}

/**
* Initiates a payment flow on a Reader and updates the PaymentIntent with card details before
* manual confirmation.
*/
public Reader collectPaymentMethod(ReaderCollectPaymentMethodParams params)
throws StripeException {
return collectPaymentMethod(params, (RequestOptions) null);
}

/**
* Initiates a payment flow on a Reader and updates the PaymentIntent with card details before
* manual confirmation.
*/
public Reader collectPaymentMethod(
ReaderCollectPaymentMethodParams params, RequestOptions options) throws StripeException {
String url =
ApiResource.fullUrl(
Stripe.getApiBase(),
options,
String.format(
"/v1/terminal/readers/%s/collect_payment_method",
ApiResource.urlEncodeId(this.getId())));
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Reader.class, options);
}

/** Finializes a payment on a Reader. */
public Reader confirmPaymentIntent(Map<String, Object> params) throws StripeException {
return confirmPaymentIntent(params, (RequestOptions) null);
}

/** Finializes a payment on a Reader. */
public Reader confirmPaymentIntent(Map<String, Object> params, RequestOptions options)
throws StripeException {
String url =
ApiResource.fullUrl(
Stripe.getApiBase(),
options,
String.format(
"/v1/terminal/readers/%s/confirm_payment_intent",
ApiResource.urlEncodeId(this.getId())));
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Reader.class, options);
}

/** Finializes a payment on a Reader. */
public Reader confirmPaymentIntent(ReaderConfirmPaymentIntentParams params)
throws StripeException {
return confirmPaymentIntent(params, (RequestOptions) null);
}

/** Finializes a payment on a Reader. */
public Reader confirmPaymentIntent(
ReaderConfirmPaymentIntentParams params, RequestOptions options) throws StripeException {
String url =
ApiResource.fullUrl(
Stripe.getApiBase(),
options,
String.format(
"/v1/terminal/readers/%s/confirm_payment_intent",
ApiResource.urlEncodeId(this.getId())));
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Reader.class, options);
}

/** Creates a new {@code Reader} object. */
public static Reader create(Map<String, Object> params) throws StripeException {
return create(params, (RequestOptions) null);
Expand Down Expand Up @@ -521,6 +610,14 @@ public static class Action extends StripeObject {
@SerializedName("collect_inputs")
CollectInputs collectInputs;

/** Represents a reader action to collect a payment method. */
@SerializedName("collect_payment_method")
CollectPaymentMethod collectPaymentMethod;

/** Represents a reader action to confirm a payment. */
@SerializedName("confirm_payment_intent")
ConfirmPaymentIntent confirmPaymentIntent;

/** Failure code, only set if status is {@code failed}. */
@SerializedName("failure_code")
String failureCode;
Expand Down Expand Up @@ -556,8 +653,9 @@ public static class Action extends StripeObject {
/**
* Type of action performed by the reader.
*
* <p>One of {@code collect_inputs}, {@code process_payment_intent}, {@code
* process_setup_intent}, {@code refund_payment}, or {@code set_reader_display}.
* <p>One of {@code collect_inputs}, {@code collect_payment_method}, {@code
* confirm_payment_intent}, {@code process_payment_intent}, {@code process_setup_intent}, {@code
* refund_payment}, or {@code set_reader_display}.
*/
@SerializedName("type")
String type;
Expand Down Expand Up @@ -675,6 +773,118 @@ public static class Signature extends StripeObject {
}
}

/** Represents a reader action to collect a payment method. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class CollectPaymentMethod extends StripeObject {
/** Represents a per-transaction override of a reader configuration. */
@SerializedName("collect_config")
CollectConfig collectConfig;

/** Most recent PaymentIntent processed by the reader. */
@SerializedName("payment_intent")
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<PaymentIntent> paymentIntent;

/**
* PaymentMethod objects represent your customer's payment instruments. You can use them with
* <a href="https://stripe.com/docs/payments/payment-intents">PaymentIntents</a> to collect
* payments or save them to Customer objects to store instrument details for future payments.
*
* <p>Related guides: <a href="https://stripe.com/docs/payments/payment-methods">Payment
* Methods</a> and <a href="https://stripe.com/docs/payments/more-payment-scenarios">More
* Payment Scenarios</a>.
*/
@SerializedName("payment_method")
PaymentMethod paymentMethod;

@SerializedName("stripe_account")
String stripeAccount;

/** Get ID of expandable {@code paymentIntent} object. */
public String getPaymentIntent() {
return (this.paymentIntent != null) ? this.paymentIntent.getId() : null;
}

public void setPaymentIntent(String id) {
this.paymentIntent = ApiResource.setExpandableFieldId(id, this.paymentIntent);
}

/** Get expanded {@code paymentIntent}. */
public PaymentIntent getPaymentIntentObject() {
return (this.paymentIntent != null) ? this.paymentIntent.getExpanded() : null;
}

public void setPaymentIntentObject(PaymentIntent expandableObject) {
this.paymentIntent =
new ExpandableField<PaymentIntent>(expandableObject.getId(), expandableObject);
}

/** Represents a per-transaction override of a reader configuration. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class CollectConfig extends StripeObject {
/** Override showing a tipping selection screen on this transaction. */
@SerializedName("skip_tipping")
Boolean skipTipping;

/** Represents a per-transaction tipping configuration. */
@SerializedName("tipping")
Tipping tipping;

/** Represents a per-transaction tipping configuration. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Tipping extends StripeObject {
/**
* Amount used to calculate tip suggestions on tipping selection screen for this
* transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents
* to represent $1.00 or 100 to represent ¥100, a zero-decimal currency).
*/
@SerializedName("amount_eligible")
Long amountEligible;
}
}
}

/** Represents a reader action to confirm a payment. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class ConfirmPaymentIntent extends StripeObject {
/** Most recent PaymentIntent processed by the reader. */
@SerializedName("payment_intent")
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<PaymentIntent> paymentIntent;

@SerializedName("stripe_account")
String stripeAccount;

/** Get ID of expandable {@code paymentIntent} object. */
public String getPaymentIntent() {
return (this.paymentIntent != null) ? this.paymentIntent.getId() : null;
}

public void setPaymentIntent(String id) {
this.paymentIntent = ApiResource.setExpandableFieldId(id, this.paymentIntent);
}

/** Get expanded {@code paymentIntent}. */
public PaymentIntent getPaymentIntentObject() {
return (this.paymentIntent != null) ? this.paymentIntent.getExpanded() : null;
}

public void setPaymentIntentObject(PaymentIntent expandableObject) {
this.paymentIntent =
new ExpandableField<PaymentIntent>(expandableObject.getId(), expandableObject);
}
}

/** Represents a reader action to process a payment intent. */
@Getter
@Setter
Expand All @@ -690,6 +900,9 @@ public static class ProcessPaymentIntent extends StripeObject {
@SerializedName("process_config")
ProcessConfig processConfig;

@SerializedName("stripe_account")
String stripeAccount;

/** Get ID of expandable {@code paymentIntent} object. */
public String getPaymentIntent() {
return (this.paymentIntent != null) ? this.paymentIntent.getId() : null;
Expand Down Expand Up @@ -839,6 +1052,9 @@ public static class RefundPayment extends StripeObject {
@SerializedName("reverse_transfer")
Boolean reverseTransfer;

@SerializedName("stripe_account")
String stripeAccount;

/** Get ID of expandable {@code charge} object. */
public String getCharge() {
return (this.charge != null) ? this.charge.getId() : null;
Expand Down

0 comments on commit 64e6d27

Please sign in to comment.