Skip to content
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
7 changes: 5 additions & 2 deletions src/main/java/com/stripe/model/v2/core/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,15 @@ protected StripeObject fetchRelatedObject(RelatedObject relatedObject) throws St
objectClass = StripeRawJsonObject.class;
}

RequestOptions opts = null;
RequestOptions.RequestOptionsBuilder optsBuilder = new RequestOptions.RequestOptionsBuilder();
// optsBuilder.setStripeRequestTrigger("event=" + id); // TODO https://go/j/DEVSDK-3018

if (context != null) {
opts = new RequestOptions.RequestOptionsBuilder().setStripeAccount(context).build();
optsBuilder.setStripeAccount(context);
}

RequestOptions opts = optsBuilder.build();

return this.responseGetter.request(
new ApiRequest(
BaseAddress.API, ApiResource.RequestMethod.GET, relatedObject.getUrl(), null, opts),
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/stripe/net/HttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,18 @@ static String detectAIAgent() {

static String detectAIAgent(Function<String, String> getEnv) {
String[][] agents = {
// The beginning of the section generated from our OpenAPI spec
{"ANTIGRAVITY_CLI_ALIAS", "antigravity"},
{"CLAUDECODE", "claude_code"},
{"CLINE_ACTIVE", "cline"},
{"CODEX_SANDBOX", "codex_cli"},
{"CODEX_THREAD_ID", "codex_cli"},
{"CODEX_SANDBOX_NETWORK_DISABLED", "codex_cli"},
{"CODEX_CI", "codex_cli"},
{"CURSOR_AGENT", "cursor"},
{"GEMINI_CLI", "gemini_cli"},
{"OPENCODE", "open_code"},
// The end of the section generated from our OpenAPI spec
};
for (String[] agent : agents) {
String val = getEnv.apply(agent[0]);
Expand Down