Skip to content

Commit

Permalink
Merge from master to beta (#1893)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-stripe authored Oct 4, 2024
1 parent 231916e commit 0ea903a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 27.1.0 - 2024-10-03
* [#1890](https://github.com/stripe/stripe-java/pull/1890) Update the class for `ThinEvent` to include `livemode` and `reason`
* [#1891](https://github.com/stripe/stripe-java/pull/1891) Removed the class `RequestSigningAuthenticator` that was added in the previous release. Request Signing is not supported yet.
* [#1889](https://github.com/stripe/stripe-java/pull/1889) Update generated code
* Remove the support for resource `Margin` that was accidentally made public in the last release

## 27.0.0 - 2024-10-01
* [#1880](https://github.com/stripe/stripe-java/pull/1880) Support for APIs in the new API version 2024-09-30.acacia

Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/stripe/model/ThinEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,19 @@ public class ThinEvent {
@SerializedName("created")
public Instant created;

/** Livemode indicates if the event is from a production(true) or test(false) account. */
@SerializedName("livemode")
public Boolean livemode;

/** [Optional] Authentication context needed to fetch the event or related object. */
@SerializedName("context")
public String context;

/** [Optional] Object containing the reference to API resource relevant to the event. */
@SerializedName("related_object")
public ThinEventRelatedObject relatedObject;

/** [Optional] Reason for the event. */
@SerializedName("reason")
public com.stripe.model.v2.Event.Reason reason;
}
5 changes: 0 additions & 5 deletions src/main/java/com/stripe/net/RawRequestOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ public static RawRequestOptionsBuilder builder() {
public static final class RawRequestOptionsBuilder extends RequestOptions.RequestOptionsBuilder {
private Map<String, String> additionalHeaders;

/** Constructs a raw request options builder with default values. */
public RawRequestOptionsBuilder() {
super();
}

public Map<String, String> getAdditionalHeaders() {
return this.additionalHeaders;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/net/RequestOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ protected static String normalizeClientId(String clientId) {
}

protected static String normalizeStripeVersion(String stripeVersion) {
// null stripeVersions are considered "valid" and use Stripe.stripeVersion
// null stripeVersions are considered "valid" and use Stripe.apiVersion
if (stripeVersion == null) {
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/stripe/RawRequestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public void testPreviewGetRequestClient() throws StripeException, InterruptedExc
final RawRequestOptions options = RawRequestOptions.builder().setApiKey("sk_123").build();

final StripeResponse response =
client.rawRequest(RequestMethod.GET, "/v2/subscription_schedules", "", options);
client.rawRequest(RequestMethod.GET, "/v1/subscription_schedules", "", options);

RecordedRequest request = server.takeRequest();
assertEquals(null, request.getHeader("Content-Type"));
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/com/stripe/StripeClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public void failsWebhookVerification()
+ " \"id\": \"evt_234\",\n"
+ " \"object\": \"event\",\n"
+ " \"type\": \"financial_account.balance.opened\",\n"
+ " \"livemode\": false,\n"
+ " \"created\": \"2022-02-15T00:27:45.330Z\",\n"
+ " \"context\": \"context 123\",\n"
+ " \"related_object\": {\n"
Expand All @@ -166,6 +167,7 @@ public void failsWebhookVerification()
+ " \"id\": \"evt_234\",\n"
+ " \"object\": \"event\",\n"
+ " \"type\": \"financial_account.balance.opened\",\n"
+ " \"livemode\": false,\n"
+ " \"created\": \"2022-02-15T00:27:45.330Z\"\n"
+ "}";

Expand Down

0 comments on commit 0ea903a

Please sign in to comment.