Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.7"
".": "0.1.0-alpha.8"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 955
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hubspot/hubspot-sdk-8aa2c4935982d3998769d656b2caae13c71151b5f00caaa875357ceb83f6e0a6.yml
openapi_spec_hash: 47d20b6496315d47f4f64441d4682f47
config_hash: 9c2a17b9755f3edac92a3ec4b93ac51c
configured_endpoints: 959
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hubspot/hubspot-sdk-5471b42def181422e461f5657935bcc5d80f62e169b34b60d017257cab8ed6a7.yml
openapi_spec_hash: 93b8671a542b331e067319184c943fdd
config_hash: 42a440e814378897b5ca0c2ad29c7f99
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.1.0-alpha.8 (2026-05-25)

Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/HubSpot/hubspot-sdk-java/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)

### Features

* **api:** manual updates ([6d430fc](https://github.com/HubSpot/hubspot-sdk-java/commit/6d430fc5ddb7aae83600c15a688fddb161cb52af))
* **api:** manual updates ([d7c232e](https://github.com/HubSpot/hubspot-sdk-java/commit/d7c232e43aa171695bbe6df5ecb30d74d4afa9b4))


### Chores

* configure new SDK language ([6a22711](https://github.com/HubSpot/hubspot-sdk-java/commit/6a22711806762dad9face4bda75ed5ac41d7fdc0))

## 0.1.0-alpha.7 (2026-05-18)

Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/HubSpot/hubspot-sdk-java/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.hubspot.sdk/hubspot-java)](https://central.sonatype.com/artifact/com.hubspot.sdk/hubspot-java/0.1.0-alpha.7)
[![javadoc](https://javadoc.io/badge2/com.hubspot.sdk/hubspot-java/0.1.0-alpha.7/javadoc.svg)](https://javadoc.io/doc/com.hubspot.sdk/hubspot-java/0.1.0-alpha.7)
[![Maven Central](https://img.shields.io/maven-central/v/com.hubspot.sdk/hubspot-java)](https://central.sonatype.com/artifact/com.hubspot.sdk/hubspot-java/0.1.0-alpha.8)
[![javadoc](https://javadoc.io/badge2/com.hubspot.sdk/hubspot-java/0.1.0-alpha.8/javadoc.svg)](https://javadoc.io/doc/com.hubspot.sdk/hubspot-java/0.1.0-alpha.8)

<!-- x-release-please-end -->

Expand All @@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/).

<!-- x-release-please-start-version -->

The REST API documentation can be found on [developers.hubspot.com](https://developers.hubspot.com/docs/api-reference/overview). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.hubspot.sdk/hubspot-java/0.1.0-alpha.7).
The REST API documentation can be found on [developers.hubspot.com](https://developers.hubspot.com/docs/api-reference/overview). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.hubspot.sdk/hubspot-java/0.1.0-alpha.8).

<!-- x-release-please-end -->

Expand All @@ -24,7 +24,7 @@ The REST API documentation can be found on [developers.hubspot.com](https://deve
### Gradle

```kotlin
implementation("com.hubspot.sdk:hubspot-java:0.1.0-alpha.7")
implementation("com.hubspot.sdk:hubspot-java:0.1.0-alpha.8")
```

### Maven
Expand All @@ -33,7 +33,7 @@ implementation("com.hubspot.sdk:hubspot-java:0.1.0-alpha.7")
<dependency>
<groupId>com.hubspot.sdk</groupId>
<artifactId>hubspot-java</artifactId>
<version>0.1.0-alpha.7</version>
<version>0.1.0-alpha.8</version>
</dependency>
```

Expand Down Expand Up @@ -257,9 +257,9 @@ These methods return [`HttpResponse`](hubspot-java-core/src/main/kotlin/com/hubs

```java
import com.hubspot.sdk.core.http.HttpResponse;
import com.hubspot.sdk.models.auth.oauth.OAuthCreateTokenParams;
import com.hubspot.sdk.models.auth.oauth.OAuthRevokeTokenParams;

HttpResponse response = client.auth().oauth().createToken();
HttpResponse response = client.auth().oauth().revokeToken();
```

To save the response content to a file, use the [`Files.copy(...)`](https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#copy-java.io.InputStream-java.nio.file.Path-java.nio.file.CopyOption...-) method:
Expand All @@ -270,7 +270,7 @@ import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;

try (HttpResponse response = client.auth().oauth().createToken(params)) {
try (HttpResponse response = client.auth().oauth().revokeToken(params)) {
Files.copy(
response.body(),
Paths.get(path),
Expand All @@ -289,7 +289,7 @@ import com.hubspot.sdk.core.http.HttpResponse;
import java.nio.file.Files;
import java.nio.file.Paths;

try (HttpResponse response = client.auth().oauth().createToken(params)) {
try (HttpResponse response = client.auth().oauth().revokeToken(params)) {
response.body().transferTo(Files.newOutputStream(Paths.get(path)));
} catch (Exception e) {
System.out.println("Something went wrong!");
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {

allprojects {
group = "com.hubspot.sdk"
version = "0.1.0-alpha.7" // x-release-please-version
version = "0.1.0-alpha.8" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import com.hubspot.sdk.services.blocking.MetaService
import com.hubspot.sdk.services.blocking.SchedulerService
import com.hubspot.sdk.services.blocking.SettingService
import com.hubspot.sdk.services.blocking.WebhookService
import com.hubspot.sdk.services.blocking.WebhooksJournalService
import java.util.function.Consumer

/**
Expand Down Expand Up @@ -86,6 +87,8 @@ interface HubSpotClient {

fun webhooks(): WebhookService

fun webhooksJournal(): WebhooksJournalService

/**
* Closes this client, relinquishing any underlying resources.
*
Expand Down Expand Up @@ -138,5 +141,7 @@ interface HubSpotClient {
fun settings(): SettingService.WithRawResponse

fun webhooks(): WebhookService.WithRawResponse

fun webhooksJournal(): WebhooksJournalService.WithRawResponse
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import com.hubspot.sdk.services.async.MetaServiceAsync
import com.hubspot.sdk.services.async.SchedulerServiceAsync
import com.hubspot.sdk.services.async.SettingServiceAsync
import com.hubspot.sdk.services.async.WebhookServiceAsync
import com.hubspot.sdk.services.async.WebhooksJournalServiceAsync
import java.util.function.Consumer

/**
Expand Down Expand Up @@ -86,6 +87,8 @@ interface HubSpotClientAsync {

fun webhooks(): WebhookServiceAsync

fun webhooksJournal(): WebhooksJournalServiceAsync

/**
* Closes this client, relinquishing any underlying resources.
*
Expand Down Expand Up @@ -142,5 +145,7 @@ interface HubSpotClientAsync {
fun settings(): SettingServiceAsync.WithRawResponse

fun webhooks(): WebhookServiceAsync.WithRawResponse

fun webhooksJournal(): WebhooksJournalServiceAsync.WithRawResponse
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import com.hubspot.sdk.services.async.SettingServiceAsync
import com.hubspot.sdk.services.async.SettingServiceAsyncImpl
import com.hubspot.sdk.services.async.WebhookServiceAsync
import com.hubspot.sdk.services.async.WebhookServiceAsyncImpl
import com.hubspot.sdk.services.async.WebhooksJournalServiceAsync
import com.hubspot.sdk.services.async.WebhooksJournalServiceAsyncImpl
import java.util.function.Consumer

class HubSpotClientAsyncImpl(private val clientOptions: ClientOptions) : HubSpotClientAsync {
Expand Down Expand Up @@ -103,6 +105,10 @@ class HubSpotClientAsyncImpl(private val clientOptions: ClientOptions) : HubSpot
WebhookServiceAsyncImpl(clientOptionsWithUserAgent)
}

private val webhooksJournal: WebhooksJournalServiceAsync by lazy {
WebhooksJournalServiceAsyncImpl(clientOptionsWithUserAgent)
}

override fun sync(): HubSpotClient = sync

override fun withRawResponse(): HubSpotClientAsync.WithRawResponse = withRawResponse
Expand Down Expand Up @@ -141,6 +147,8 @@ class HubSpotClientAsyncImpl(private val clientOptions: ClientOptions) : HubSpot

override fun webhooks(): WebhookServiceAsync = webhooks

override fun webhooksJournal(): WebhooksJournalServiceAsync = webhooksJournal

override fun close() = clientOptions.close()

class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
Expand Down Expand Up @@ -207,6 +215,10 @@ class HubSpotClientAsyncImpl(private val clientOptions: ClientOptions) : HubSpot
WebhookServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}

private val webhooksJournal: WebhooksJournalServiceAsync.WithRawResponse by lazy {
WebhooksJournalServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}

override fun withOptions(
modifier: Consumer<ClientOptions.Builder>
): HubSpotClientAsync.WithRawResponse =
Expand Down Expand Up @@ -244,5 +256,8 @@ class HubSpotClientAsyncImpl(private val clientOptions: ClientOptions) : HubSpot
override fun settings(): SettingServiceAsync.WithRawResponse = settings

override fun webhooks(): WebhookServiceAsync.WithRawResponse = webhooks

override fun webhooksJournal(): WebhooksJournalServiceAsync.WithRawResponse =
webhooksJournal
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import com.hubspot.sdk.services.blocking.SettingService
import com.hubspot.sdk.services.blocking.SettingServiceImpl
import com.hubspot.sdk.services.blocking.WebhookService
import com.hubspot.sdk.services.blocking.WebhookServiceImpl
import com.hubspot.sdk.services.blocking.WebhooksJournalService
import com.hubspot.sdk.services.blocking.WebhooksJournalServiceImpl
import java.util.function.Consumer

class HubSpotClientImpl(private val clientOptions: ClientOptions) : HubSpotClient {
Expand Down Expand Up @@ -95,6 +97,10 @@ class HubSpotClientImpl(private val clientOptions: ClientOptions) : HubSpotClien

private val webhooks: WebhookService by lazy { WebhookServiceImpl(clientOptionsWithUserAgent) }

private val webhooksJournal: WebhooksJournalService by lazy {
WebhooksJournalServiceImpl(clientOptionsWithUserAgent)
}

override fun async(): HubSpotClientAsync = async

override fun withRawResponse(): HubSpotClient.WithRawResponse = withRawResponse
Expand Down Expand Up @@ -133,6 +139,8 @@ class HubSpotClientImpl(private val clientOptions: ClientOptions) : HubSpotClien

override fun webhooks(): WebhookService = webhooks

override fun webhooksJournal(): WebhooksJournalService = webhooksJournal

override fun close() = clientOptions.close()

class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
Expand Down Expand Up @@ -199,6 +207,10 @@ class HubSpotClientImpl(private val clientOptions: ClientOptions) : HubSpotClien
WebhookServiceImpl.WithRawResponseImpl(clientOptions)
}

private val webhooksJournal: WebhooksJournalService.WithRawResponse by lazy {
WebhooksJournalServiceImpl.WithRawResponseImpl(clientOptions)
}

override fun withOptions(
modifier: Consumer<ClientOptions.Builder>
): HubSpotClient.WithRawResponse =
Expand Down Expand Up @@ -236,5 +248,7 @@ class HubSpotClientImpl(private val clientOptions: ClientOptions) : HubSpotClien
override fun settings(): SettingService.WithRawResponse = settings

override fun webhooks(): WebhookService.WithRawResponse = webhooks

override fun webhooksJournal(): WebhooksJournalService.WithRawResponse = webhooksJournal
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless.

package com.hubspot.sdk.models.webhooks
package com.hubspot.sdk.models

import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonAnySetter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless.

package com.hubspot.sdk.models.webhooks
package com.hubspot.sdk.models

import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonAnySetter
Expand Down Expand Up @@ -280,29 +280,14 @@ private constructor(

companion object {

@JvmField val OBJECT = of("OBJECT")

@JvmField val ASSOCIATION = of("ASSOCIATION")

@JvmField val EVENT = of("EVENT")

@JvmField val APP_LIFECYCLE_EVENT = of("APP_LIFECYCLE_EVENT")

@JvmField val LIST_MEMBERSHIP = of("LIST_MEMBERSHIP")

@JvmField val GDPR_PRIVACY_DELETION = of("GDPR_PRIVACY_DELETION")

@JvmStatic fun of(value: String) = SubscriptionType(JsonField.of(value))
}

/** An enum containing [SubscriptionType]'s known values. */
enum class Known {
OBJECT,
ASSOCIATION,
EVENT,
APP_LIFECYCLE_EVENT,
LIST_MEMBERSHIP,
GDPR_PRIVACY_DELETION,
APP_LIFECYCLE_EVENT
}

/**
Expand All @@ -315,12 +300,7 @@ private constructor(
* - It was constructed with an arbitrary value using the [of] method.
*/
enum class Value {
OBJECT,
ASSOCIATION,
EVENT,
APP_LIFECYCLE_EVENT,
LIST_MEMBERSHIP,
GDPR_PRIVACY_DELETION,
/**
* An enum member indicating that [SubscriptionType] was instantiated with an unknown
* value.
Expand All @@ -337,12 +317,7 @@ private constructor(
*/
fun value(): Value =
when (this) {
OBJECT -> Value.OBJECT
ASSOCIATION -> Value.ASSOCIATION
EVENT -> Value.EVENT
APP_LIFECYCLE_EVENT -> Value.APP_LIFECYCLE_EVENT
LIST_MEMBERSHIP -> Value.LIST_MEMBERSHIP
GDPR_PRIVACY_DELETION -> Value.GDPR_PRIVACY_DELETION
else -> Value._UNKNOWN
}

Expand All @@ -357,12 +332,7 @@ private constructor(
*/
fun known(): Known =
when (this) {
OBJECT -> Known.OBJECT
ASSOCIATION -> Known.ASSOCIATION
EVENT -> Known.EVENT
APP_LIFECYCLE_EVENT -> Known.APP_LIFECYCLE_EVENT
LIST_MEMBERSHIP -> Known.LIST_MEMBERSHIP
GDPR_PRIVACY_DELETION -> Known.GDPR_PRIVACY_DELETION
else -> throw HubSpotInvalidDataException("Unknown SubscriptionType: $value")
}

Expand Down
Loading
Loading