Skip to content

Commit

Permalink
API Updates for beta branch (#1467)
Browse files Browse the repository at this point in the history
* Do not run Coveralls if secret token is not available (#1463)

* Set version to 21.13.0 to simplify merge

* Reset version to 21.14.0-beta.1

* Codegen for openapi v205

Co-authored-by: anniel-stripe <97691964+anniel-stripe@users.noreply.github.com>
  • Loading branch information
kamil-stripe and anniel-stripe authored Nov 2, 2022
1 parent a3954f6 commit 85e7d97
Show file tree
Hide file tree
Showing 45 changed files with 4,355 additions and 191 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:

- name: Send code coverage report to coveralls.io
run: ./gradlew jacocoTestReport coveralls
if: matrix.java-version == '17'
if: env.COVERALLS_REPO_TOKEN && matrix.java-version == '17'
env:
CI_NAME: github-actions
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v203
v205
18 changes: 18 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,15 @@ public static class Capabilities extends StripeObject {
@SerializedName("cartes_bancaires_payments")
String cartesBancairesPayments;

/**
* The status of the Cash App Pay capability of the account, or whether the account can directly
* process Cash App Pay payments.
*
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
*/
@SerializedName("cashapp_payments")
String cashappPayments;

/**
* The status of the EPS payments capability of the account, or whether the account can directly
* process EPS charges.
Expand Down Expand Up @@ -930,6 +939,15 @@ public static class Capabilities extends StripeObject {
*/
@SerializedName("us_bank_account_ach_payments")
String usBankAccountAchPayments;

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

@Getter
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/stripe/model/AccountSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

/**
* An AccountSession allows a Connect platform to grant access to a connected account in Connect
* Elements.
* embedded UIs.
*
* <p>We recommend that you create an AccountSession each time you need to display an embedded UI to
* your user. Do not save AccountSessions to your database as they expire relatively quickly, and
* cannot be used more than once.
*
* <p>Related guide: <a href="https://stripe.com/docs/connect/get-started-connect-elements">Connect
* Elements</a>.
* <p>Related guide: <a
* href="https://stripe.com/docs/connect/get-started-connect-embedded-uis">Connect embedded UIs</a>.
*/
@Getter
@Setter
Expand All @@ -40,8 +40,8 @@ public class AccountSession extends ApiResource {
* that you have TLS enabled on any page that includes the client secret.
*
* <p>Refer to our docs to <a
* href="https://stripe.com/docs/connect/get-started-connect-elements">setup Connect Elements</a>
* and learn about how {@code client_secret} should be handled.
* href="https://stripe.com/docs/connect/get-started-connect-embedded-uis">setup Connect embedded
* UIs</a> and learn about how {@code client_secret} should be handled.
*/
@SerializedName("client_secret")
String clientSecret;
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("card_present")
CardPresent cardPresent;

@SerializedName("cashapp")
Cashapp cashapp;

@SerializedName("customer_balance")
CustomerBalance customerBalance;

Expand Down Expand Up @@ -1210,6 +1213,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("wechat_pay")
WechatPay wechatPay;

@SerializedName("zip")
Zip zip;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -1990,6 +1996,11 @@ public static class Receipt extends StripeObject {
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Cashapp extends StripeObject {}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -2724,6 +2735,11 @@ public static class WechatPay extends StripeObject {
@SerializedName("transaction_id")
String transactionId;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Zip extends StripeObject {}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,7 @@ public static class CustomerTaxId extends StripeObject {
* ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code ae_trn}, {@code
* cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat}, {@code ge_vat},
* {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code si_tin}, {@code
* ke_pin}, or {@code unknown}.
* ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, or {@code unknown}.
*/
@SerializedName("type")
String type;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/stripe/model/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,8 @@ public static class TaxId extends StripeObject {
* ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code
* ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat},
* {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code
* si_tin}, {@code ke_pin}, or {@code unknown}.
* si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, or {@code
* unknown}.
*/
@SerializedName("type")
String type;
Expand Down
75 changes: 75 additions & 0 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,9 @@ public static class NextAction extends StripeObject {
@SerializedName("card_await_notification")
NextActionCardAwaitNotification cardAwaitNotification;

@SerializedName("cashapp_handle_redirect_or_display_qr_code")
CashappHandleRedirectOrDisplayQrCode cashappHandleRedirectOrDisplayQrCode;

@SerializedName("display_bank_transfer_instructions")
NextActionDisplayBankTransferInstructions displayBankTransferInstructions;

Expand Down Expand Up @@ -1471,6 +1474,42 @@ public static class NextAction extends StripeObject {
@SerializedName("wechat_pay_redirect_to_ios_app")
WechatPayRedirectToIosApp wechatPayRedirectToIosApp;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class CashappHandleRedirectOrDisplayQrCode extends StripeObject {
/**
* The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR
* code, and supports QR code refreshing on expiration.
*/
@SerializedName("hosted_instructions_url")
String hostedInstructionsUrl;

/** The url for mobile redirect based auth. */
@SerializedName("mobile_auth_url")
String mobileAuthUrl;

@SerializedName("qr_code")
QrCode qrCode;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class QrCode extends StripeObject {
/** The date (unix timestamp) when the QR code expires. */
@SerializedName("expires_at")
Long expiresAt;

/** The image_url_png string used to render QR code. */
@SerializedName("image_url_png")
String imageUrlPng;

/** The image_url_svg string used to render QR code. */
@SerializedName("image_url_svg")
String imageUrlSvg;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -2062,6 +2101,9 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("card_present")
CardPresent cardPresent;

@SerializedName("cashapp")
Cashapp cashapp;

@SerializedName("customer_balance")
CustomerBalance customerBalance;

Expand Down Expand Up @@ -2694,6 +2736,39 @@ public static class CardPresent extends StripeObject {
Boolean requestIncrementalAuthorizationSupport;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Cashapp extends StripeObject {
/**
* Controls when the funds will be captured from the customer's account.
*
* <p>Equal to {@code manual}.
*/
@SerializedName("capture_method")
String captureMethod;

/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* <p>Providing this parameter will <a
* href="https://stripe.com/docs/payments/save-during-payment">attach the payment method</a>
* to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any
* required actions from the user are complete. If no Customer was provided, the payment
* method can still be <a
* href="https://stripe.com/docs/api/payment_methods/attach">attached</a> to a Customer after
* the transaction completes.
*
* <p>When processing card payments, Stripe also uses {@code setup_future_usage} to
* dynamically optimize your payment flow and comply with regional legislation and network
* rules, such as <a href="https://stripe.com/docs/strong-customer-authentication">SCA</a>.
*
* <p>One of {@code none}, {@code off_session}, or {@code on_session}.
*/
@SerializedName("setup_future_usage")
String setupFutureUsage;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
26 changes: 21 additions & 5 deletions src/main/java/com/stripe/model/PaymentMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
@SerializedName("card_present")
CardPresent cardPresent;

@SerializedName("cashapp")
Cashapp cashapp;

/** Time at which the object was created. Measured in seconds since the Unix epoch. */
@SerializedName("created")
Long created;
Expand Down Expand Up @@ -175,11 +178,11 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
*
* <p>One of {@code acss_debit}, {@code affirm}, {@code afterpay_clearpay}, {@code alipay}, {@code
* au_becs_debit}, {@code bacs_debit}, {@code bancontact}, {@code blik}, {@code boleto}, {@code
* card}, {@code card_present}, {@code customer_balance}, {@code eps}, {@code fpx}, {@code
* giropay}, {@code grabpay}, {@code ideal}, {@code interac_present}, {@code klarna}, {@code
* konbini}, {@code link}, {@code oxxo}, {@code p24}, {@code paynow}, {@code paypal}, {@code pix},
* {@code promptpay}, {@code sepa_debit}, {@code sofort}, {@code us_bank_account}, or {@code
* wechat_pay}.
* card}, {@code card_present}, {@code cashapp}, {@code customer_balance}, {@code eps}, {@code
* fpx}, {@code giropay}, {@code grabpay}, {@code ideal}, {@code interac_present}, {@code klarna},
* {@code konbini}, {@code link}, {@code oxxo}, {@code p24}, {@code paynow}, {@code paypal},
* {@code pix}, {@code promptpay}, {@code sepa_debit}, {@code sofort}, {@code us_bank_account},
* {@code wechat_pay}, or {@code zip}.
*/
@SerializedName("type")
String type;
Expand All @@ -190,6 +193,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
@SerializedName("wechat_pay")
WechatPay wechatPay;

@SerializedName("zip")
Zip zip;

/** Get ID of expandable {@code customer} object. */
public String getCustomer() {
return (this.customer != null) ? this.customer.getId() : null;
Expand Down Expand Up @@ -960,6 +966,11 @@ public static class VisaCheckout extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class CardPresent extends StripeObject {}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Cashapp extends StripeObject {}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -1311,4 +1322,9 @@ public static class Networks extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class WechatPay extends StripeObject {}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Zip extends StripeObject {}
}
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/model/Refund.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
* {@code Refund} objects allow you to refund a charge that has previously been created but not yet
* refunded. Funds will be refunded to the credit or debit card that was originally charged.
*
* <p>Stripe Tax users with recurring payments and invoices can create <a
* href="https://stripe.com/docs/api/credit_notes">Credit Notes</a>, which reduce overall tax
* liability because tax is correctly recalculated and apportioned to the related invoice.
*
* <p>Related guide: <a href="https://stripe.com/docs/refunds">Refunds</a>.
*/
@Getter
Expand Down
39 changes: 39 additions & 0 deletions src/main/java/com/stripe/model/SetupIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,9 @@ public SetupIntent verifyMicrodeposits(
@Setter
@EqualsAndHashCode(callSuper = false)
public static class NextAction extends StripeObject {
@SerializedName("cashapp_handle_redirect_or_display_qr_code")
CashappHandleRedirectOrDisplayQrCode cashappHandleRedirectOrDisplayQrCode;

@SerializedName("redirect_to_url")
NextActionRedirectToUrl redirectToUrl;

Expand All @@ -794,6 +797,42 @@ public static class NextAction extends StripeObject {
@SerializedName("verify_with_microdeposits")
VerifyWithMicrodeposits verifyWithMicrodeposits;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class CashappHandleRedirectOrDisplayQrCode extends StripeObject {
/**
* The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR
* code, and supports QR code refreshing on expiration.
*/
@SerializedName("hosted_instructions_url")
String hostedInstructionsUrl;

/** The url for mobile redirect based auth. */
@SerializedName("mobile_auth_url")
String mobileAuthUrl;

@SerializedName("qr_code")
QrCode qrCode;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class QrCode extends StripeObject {
/** The date (unix timestamp) when the QR code expires. */
@SerializedName("expires_at")
Long expiresAt;

/** The image_url_png string used to render QR code. */
@SerializedName("image_url_png")
String imageUrlPng;

/** The image_url_svg string used to render QR code. */
@SerializedName("image_url_svg")
String imageUrlSvg;
}
}

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

0 comments on commit 85e7d97

Please sign in to comment.