Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into sdk-release/next-major
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-stripe committed Mar 30, 2024
2 parents eb5f660 + c80df8b commit da4c5c8
Show file tree
Hide file tree
Showing 56 changed files with 3,497 additions and 151 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 24.22.0 - 2024-03-28
* [#1770](https://github.com/stripe/stripe-java/pull/1770) Update generated code
* Add support for new resources `Billing.MeterEventAdjustment`, `Billing.MeterEvent`, and `Billing.Meter`
* Add support for `create`, `deactivate`, `list`, `reactivate`, `retrieve`, and `update` methods on resource `Meter`
* Add support for `create` method on resources `MeterEventAdjustment` and `MeterEvent`
* Add support for `amazon_pay_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
* Add support for `destination_on_behalf_of_charge_management` on `AccountSession.components.payment_details.features`, `AccountSession.components.payments.features`, `AccountSessionCreateParams.components.payment_details.features`, and `AccountSessionCreateParams.components.payments.features`
* Add support for `mandate` on `Charge.payment_method_details.us_bank_account`, `Treasury.InboundTransfer.origin_payment_method_details.us_bank_account`, `Treasury.OutboundPayment.destination_payment_method_details.us_bank_account`, and `Treasury.OutboundTransfer.destination_payment_method_details.us_bank_account`
* Add support for `second_line` on `issuing.CardCreateParams`
* Add support for `meter` on `PlanCreateParams`, `Plan`, `Price.recurring`, `PriceCreateParams.recurring`, and `PriceListParams.recurring`

## 24.21.0 - 2024-03-21
* [#1768](https://github.com/stripe/stripe-java/pull/1768) Update generated code
* Add support for new resources `ConfirmationToken` and `Forwarding.Request`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v895
v911
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Stripe Java client library

[![Maven Central](https://img.shields.io/badge/maven--central-v24.21.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java)
[![Maven Central](https://img.shields.io/badge/maven--central-v24.22.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java)
[![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java)
[![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-java/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-java?branch=master)
Expand All @@ -18,7 +18,7 @@ The official [Stripe][stripe] Java client library.
Add this dependency to your project's build file:

```groovy
implementation "com.stripe:stripe-java:24.21.0"
implementation "com.stripe:stripe-java:24.22.0"
```

### Maven users
Expand All @@ -29,15 +29,15 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>24.21.0</version>
<version>24.22.0</version>
</dependency>
```

### Others

You'll need to manually install the following JARs:

- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/24.21.0/stripe-java-24.21.0.jar)
- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/24.22.0/stripe-java-24.22.0.jar)
- [Google Gson][gson] from <https://repo1.maven.org/maven2/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar>.

### [ProGuard][proguard]
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.21.0
24.22.0
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.stripe
VERSION_NAME=24.21.0
VERSION_NAME=24.22.0

POM_URL=https://github.com/stripe/stripe-java
POM_SCM_URL=git@github.com:stripe/stripe-java.git
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/Stripe.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public abstract class Stripe {
public static final String CONNECT_API_BASE = "https://connect.stripe.com";
public static final String LIVE_API_BASE = "https://api.stripe.com";
public static final String UPLOAD_API_BASE = "https://files.stripe.com";
public static final String VERSION = "24.21.0";
public static final String VERSION = "24.22.0";

public static volatile String apiKey;
public static volatile String clientId;
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/StripeClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ public com.stripe.service.BalanceTransactionService balanceTransactions() {
return new com.stripe.service.BalanceTransactionService(this.getResponseGetter());
}

public com.stripe.service.BillingService billing() {
return new com.stripe.service.BillingService(this.getResponseGetter());
}

public com.stripe.service.BillingPortalService billingPortal() {
return new com.stripe.service.BillingPortalService(this.getResponseGetter());
}
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,15 @@ public static class Capabilities extends StripeObject {
@SerializedName("afterpay_clearpay_payments")
String afterpayClearpayPayments;

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

/**
* The status of the BECS Direct Debit (AU) payments capability of the account, or whether the
* account can directly process BECS Direct Debit (AU) charges.
Expand Down Expand Up @@ -1597,6 +1606,7 @@ public static class Errors extends StripeObject {
* verification_failed_document_match}, {@code verification_failed_id_number_match}, {@code
* verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code
* verification_failed_name_match}, {@code verification_failed_other}, {@code
* verification_failed_representative_authority}, {@code
* verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code
* verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, {@code
* verification_missing_executives}, {@code verification_missing_owners}, or {@code
Expand Down Expand Up @@ -1761,6 +1771,7 @@ public static class Errors extends StripeObject {
* verification_failed_document_match}, {@code verification_failed_id_number_match}, {@code
* verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code
* verification_failed_name_match}, {@code verification_failed_other}, {@code
* verification_failed_representative_authority}, {@code
* verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code
* verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, {@code
* verification_missing_executives}, {@code verification_missing_owners}, or {@code
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/com/stripe/model/AccountSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,13 @@ public static class Features extends StripeObject {
@SerializedName("capture_payments")
Boolean capturePayments;

/**
* Whether to allow connected accounts to manage destination charges that are created on
* behalf of them. This is {@code false} by default.
*/
@SerializedName("destination_on_behalf_of_charge_management")
Boolean destinationOnBehalfOfChargeManagement;

/**
* Whether to allow responding to disputes, including submitting evidence and accepting
* disputes. This is {@code true} by default.
Expand Down Expand Up @@ -231,6 +238,13 @@ public static class Features extends StripeObject {
@SerializedName("capture_payments")
Boolean capturePayments;

/**
* Whether to allow connected accounts to manage destination charges that are created on
* behalf of them. This is {@code false} by default.
*/
@SerializedName("destination_on_behalf_of_charge_management")
Boolean destinationOnBehalfOfChargeManagement;

/**
* Whether to allow responding to disputes, including submitting evidence and accepting
* disputes. This is {@code true} by default.
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/stripe/model/BankAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ public static class Errors extends StripeObject {
* verification_failed_document_match}, {@code verification_failed_id_number_match}, {@code
* verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code
* verification_failed_name_match}, {@code verification_failed_other}, {@code
* verification_failed_representative_authority}, {@code
* verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code
* verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, {@code
* verification_missing_executives}, {@code verification_missing_owners}, or {@code
Expand Down Expand Up @@ -704,6 +705,7 @@ public static class Errors extends StripeObject {
* verification_failed_document_match}, {@code verification_failed_id_number_match}, {@code
* verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code
* verification_failed_name_match}, {@code verification_failed_other}, {@code
* verification_failed_representative_authority}, {@code
* verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code
* verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, {@code
* verification_missing_executives}, {@code verification_missing_owners}, or {@code
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/stripe/model/Capability.java
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ public static class Errors extends StripeObject {
* verification_failed_document_match}, {@code verification_failed_id_number_match}, {@code
* verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code
* verification_failed_name_match}, {@code verification_failed_other}, {@code
* verification_failed_representative_authority}, {@code
* verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code
* verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, {@code
* verification_missing_executives}, {@code verification_missing_owners}, or {@code
Expand Down Expand Up @@ -448,6 +449,7 @@ public static class Errors extends StripeObject {
* verification_failed_document_match}, {@code verification_failed_id_number_match}, {@code
* verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code
* verification_failed_name_match}, {@code verification_failed_other}, {@code
* verification_failed_representative_authority}, {@code
* verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code
* verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, {@code
* verification_missing_executives}, {@code verification_missing_owners}, or {@code
Expand Down
36 changes: 34 additions & 2 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,11 @@ public static class Receipt extends StripeObject {
@SerializedName("authorization_response_code")
String authorizationResponseCode;

/** How the cardholder verified ownership of the card. */
/**
* Describes the method used by the cardholder to verify ownership of the card. One of the
* following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin}, {@code
* offline_pin_and_signature}, {@code online_pin}, or {@code signature}.
*/
@SerializedName("cardholder_verification_method")
String cardholderVerificationMethod;

Expand Down Expand Up @@ -2555,7 +2559,11 @@ public static class Receipt extends StripeObject {
@SerializedName("authorization_response_code")
String authorizationResponseCode;

/** How the cardholder verified ownership of the card. */
/**
* Describes the method used by the cardholder to verify ownership of the card. One of the
* following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin}, {@code
* offline_pin_and_signature}, {@code online_pin}, or {@code signature}.
*/
@SerializedName("cardholder_verification_method")
String cardholderVerificationMethod;

Expand Down Expand Up @@ -3015,13 +3023,37 @@ public static class UsBankAccount extends StripeObject {
@SerializedName("last4")
String last4;

/** ID of the mandate used to make this payment. */
@SerializedName("mandate")
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<Mandate> mandate;

/** Reference number to locate ACH payments with customer's bank. */
@SerializedName("payment_reference")
String paymentReference;

/** Routing number of the bank account. */
@SerializedName("routing_number")
String routingNumber;

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

public void setMandate(String id) {
this.mandate = ApiResource.setExpandableFieldId(id, this.mandate);
}

/** Get expanded {@code mandate}. */
public Mandate getMandateObject() {
return (this.mandate != null) ? this.mandate.getExpanded() : null;
}

public void setMandateObject(Mandate expandableObject) {
this.mandate = new ExpandableField<Mandate>(expandableObject.getId(), expandableObject);
}
}

@Getter
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/stripe/model/ConfirmationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
* confirming a PaymentIntent or SetupIntent. If the confirmation is successful, values present on
* the ConfirmationToken are written onto the Intent.
*
* <p>To learn more or request access, visit the related guided: <a
* href="https://stripe.com/docs/payments/finalize-payments-on-the-server-confirmation-tokens">Finalize
* payments on the server using Confirmation Tokens</a>.
* <p>To learn more about how to use ConfirmationToken, visit the related guides: - <a
* href="https://stripe.com/docs/payments/finalize-payments-on-the-server">Finalize payments on the
* server</a> - <a href="https://stripe.com/docs/payments/build-a-two-step-confirmation">Build
* two-step confirmation</a>.
*/
@Getter
@Setter
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/stripe/model/EventDataClassLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ final class EventDataClassLookup {

classLookup.put("apps.secret", com.stripe.model.apps.Secret.class);

classLookup.put("billing.meter", com.stripe.model.billing.Meter.class);
classLookup.put("billing.meter_event", com.stripe.model.billing.MeterEvent.class);
classLookup.put(
"billing.meter_event_adjustment", com.stripe.model.billing.MeterEventAdjustment.class);
classLookup.put(
"billing.meter_event_summary", com.stripe.model.billing.MeterEventSummary.class);

classLookup.put(
"billing_portal.configuration", com.stripe.model.billingportal.Configuration.class);
classLookup.put("billing_portal.session", com.stripe.model.billingportal.Session.class);
Expand Down

0 comments on commit da4c5c8

Please sign in to comment.