From 22bfab7358a323f6e9d505ab5b66db501f46471d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 6 Nov 2026 09:28:05 +0000 Subject: [PATCH] feat(api): update SDKs to meteroid 0.1.0 BEGIN_NESTED_COMMIT feat(api): update `GET /api/v1/usage/customer/{customer_id}/costs`, `GET /api/v1/usage/customer/{customer_id}/events`, `GET /api/v1/usage/subscription/{subscription_id}/costs`, `GET /api/v1/usage/subscription/{subscription_id}/events`, `POST webhook:payment.failed` and 5 more END_NESTED_COMMIT --- src/main/java/com/meteroid/api/Customers.java | 24 ++++++++++++------- .../java/com/meteroid/api/CustomersAsync.java | 24 ++++++++++++------- .../com/meteroid/api/UsageCostsCustomer.java | 2 ++ .../meteroid/api/UsageCostsSubscription.java | 2 ++ .../models/CustomerPortalTokenResponse.java | 4 ++-- .../java/com/meteroid/models/DeclineKind.java | 12 ++++++++-- 6 files changed, 48 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/meteroid/api/Customers.java b/src/main/java/com/meteroid/api/Customers.java index 283696c..0714d6c 100644 --- a/src/main/java/com/meteroid/api/Customers.java +++ b/src/main/java/com/meteroid/api/Customers.java @@ -417,8 +417,10 @@ MeteroidHttpClient.Exchange exchangeListEntitl /** * Generate a portal token for a customer * - *

Generates a JWT token that grants access to the customer portal. The token can be used to - * access invoices, payment methods, and other portal features. + *

Generates an opaque token that grants access to the customer portal. A call may return the + * token of an earlier call with the same scopes, with up to 10% less lifetime: rely on + * expires_at. The token can be used to access invoices, payment methods, and other + * portal features. * * @param idOrAlias the {@code id_or_alias} path parameter * @param customerPortalTokenRequest the request body @@ -432,8 +434,10 @@ public CustomerPortalTokenResponse createPortalToken( /** * Generate a portal token for a customer * - *

Generates a JWT token that grants access to the customer portal. The token can be used to - * access invoices, payment methods, and other portal features. + *

Generates an opaque token that grants access to the customer portal. A call may return the + * token of an earlier call with the same scopes, with up to 10% less lifetime: rely on + * expires_at. The token can be used to access invoices, payment methods, and other + * portal features. * * @param idOrAlias the {@code id_or_alias} path parameter * @param customerPortalTokenRequest the request body @@ -722,8 +726,10 @@ public ApiResponse listEntitlements( /** * Generate a portal token for a customer * - *

Generates a JWT token that grants access to the customer portal. The token can be used - * to access invoices, payment methods, and other portal features. + *

Generates an opaque token that grants access to the customer portal. A call may return + * the token of an earlier call with the same scopes, with up to 10% less lifetime: rely on + * expires_at. The token can be used to access invoices, payment methods, and + * other portal features. * * @param idOrAlias the {@code id_or_alias} path parameter * @param customerPortalTokenRequest the request body @@ -738,8 +744,10 @@ public ApiResponse createPortalToken( /** * Generate a portal token for a customer * - *

Generates a JWT token that grants access to the customer portal. The token can be used - * to access invoices, payment methods, and other portal features. + *

Generates an opaque token that grants access to the customer portal. A call may return + * the token of an earlier call with the same scopes, with up to 10% less lifetime: rely on + * expires_at. The token can be used to access invoices, payment methods, and + * other portal features. * * @param idOrAlias the {@code id_or_alias} path parameter * @param customerPortalTokenRequest the request body diff --git a/src/main/java/com/meteroid/api/CustomersAsync.java b/src/main/java/com/meteroid/api/CustomersAsync.java index de12a92..17c1d8d 100644 --- a/src/main/java/com/meteroid/api/CustomersAsync.java +++ b/src/main/java/com/meteroid/api/CustomersAsync.java @@ -260,8 +260,10 @@ public CompletableFuture listEntitlements( /** * Generate a portal token for a customer * - *

Generates a JWT token that grants access to the customer portal. The token can be used to - * access invoices, payment methods, and other portal features. + *

Generates an opaque token that grants access to the customer portal. A call may return the + * token of an earlier call with the same scopes, with up to 10% less lifetime: rely on + * expires_at. The token can be used to access invoices, payment methods, and other + * portal features. * * @param idOrAlias the {@code id_or_alias} path parameter * @param customerPortalTokenRequest the request body @@ -275,8 +277,10 @@ public CompletableFuture createPortalToken( /** * Generate a portal token for a customer * - *

Generates a JWT token that grants access to the customer portal. The token can be used to - * access invoices, payment methods, and other portal features. + *

Generates an opaque token that grants access to the customer portal. A call may return the + * token of an earlier call with the same scopes, with up to 10% less lifetime: rely on + * expires_at. The token can be used to access invoices, payment methods, and other + * portal features. * * @param idOrAlias the {@code id_or_alias} path parameter * @param customerPortalTokenRequest the request body @@ -531,8 +535,10 @@ public CompletableFuture> listEnti /** * Generate a portal token for a customer * - *

Generates a JWT token that grants access to the customer portal. The token can be used - * to access invoices, payment methods, and other portal features. + *

Generates an opaque token that grants access to the customer portal. A call may return + * the token of an earlier call with the same scopes, with up to 10% less lifetime: rely on + * expires_at. The token can be used to access invoices, payment methods, and + * other portal features. * * @param idOrAlias the {@code id_or_alias} path parameter * @param customerPortalTokenRequest the request body @@ -547,8 +553,10 @@ public CompletableFuture> createPortalT /** * Generate a portal token for a customer * - *

Generates a JWT token that grants access to the customer portal. The token can be used - * to access invoices, payment methods, and other portal features. + *

Generates an opaque token that grants access to the customer portal. A call may return + * the token of an earlier call with the same scopes, with up to 10% less lifetime: rely on + * expires_at. The token can be used to access invoices, payment methods, and + * other portal features. * * @param idOrAlias the {@code id_or_alias} path parameter * @param customerPortalTokenRequest the request body diff --git a/src/main/java/com/meteroid/api/UsageCostsCustomer.java b/src/main/java/com/meteroid/api/UsageCostsCustomer.java index 82a9f03..5468a80 100644 --- a/src/main/java/com/meteroid/api/UsageCostsCustomer.java +++ b/src/main/java/com/meteroid/api/UsageCostsCustomer.java @@ -212,6 +212,7 @@ MeteroidHttpClient.Exchange exchangeListCosts( com.meteroid.models.RestErrorResponse.class, "400", "401", + "403", "404", "429", "500") @@ -372,6 +373,7 @@ MeteroidHttpClient.Exchange exchangeListEvents( com.meteroid.models.RestErrorResponse.class, "400", "401", + "403", "404", "429", "500") diff --git a/src/main/java/com/meteroid/api/UsageCostsSubscription.java b/src/main/java/com/meteroid/api/UsageCostsSubscription.java index c62d5b1..8cd8af5 100644 --- a/src/main/java/com/meteroid/api/UsageCostsSubscription.java +++ b/src/main/java/com/meteroid/api/UsageCostsSubscription.java @@ -202,6 +202,7 @@ MeteroidHttpClient.Exchange exchangeListCosts( com.meteroid.models.RestErrorResponse.class, "400", "401", + "403", "404", "429", "500") @@ -358,6 +359,7 @@ MeteroidHttpClient.Exchange exchangeListEvents( com.meteroid.models.RestErrorResponse.class, "400", "401", + "403", "404", "429", "500") diff --git a/src/main/java/com/meteroid/models/CustomerPortalTokenResponse.java b/src/main/java/com/meteroid/models/CustomerPortalTokenResponse.java index ba777f3..cedef8a 100644 --- a/src/main/java/com/meteroid/models/CustomerPortalTokenResponse.java +++ b/src/main/java/com/meteroid/models/CustomerPortalTokenResponse.java @@ -115,7 +115,7 @@ public String portalUrl() { } /** - * JWT token for portal access + * Opaque token for portal access * * @return the value, never null */ @@ -238,7 +238,7 @@ public Builder portalUrl(String portalUrl) { } /** - * JWT token for portal access + * Opaque token for portal access * * @param token the value * @return this builder diff --git a/src/main/java/com/meteroid/models/DeclineKind.java b/src/main/java/com/meteroid/models/DeclineKind.java index e079a31..697a59f 100644 --- a/src/main/java/com/meteroid/models/DeclineKind.java +++ b/src/main/java/com/meteroid/models/DeclineKind.java @@ -50,6 +50,9 @@ public final class DeclineKind implements ToQueryParam { public static final DeclineKind DO_NOT_RETRY = new DeclineKind("DO_NOT_RETRY", Value.DO_NOT_RETRY); + /** The value {@code "UNCONFIRMED"}. */ + public static final DeclineKind UNCONFIRMED = new DeclineKind("UNCONFIRMED", Value.UNCONFIRMED); + private static final Map constants = Map.ofEntries( Map.entry("INSUFFICIENT_FUNDS", INSUFFICIENT_FUNDS), @@ -60,7 +63,8 @@ public final class DeclineKind implements ToQueryParam { Map.entry("FRAUD", FRAUD), Map.entry("PROCESSING_ERROR", PROCESSING_ERROR), Map.entry("OTHER", OTHER), - Map.entry("DO_NOT_RETRY", DO_NOT_RETRY)); + Map.entry("DO_NOT_RETRY", DO_NOT_RETRY), + Map.entry("UNCONFIRMED", UNCONFIRMED)); private final String value; private final Value variant; @@ -163,7 +167,9 @@ public enum Known { /** The {@code OTHER} constant. */ OTHER, /** The {@code DO_NOT_RETRY} constant. */ - DO_NOT_RETRY + DO_NOT_RETRY, + /** The {@code UNCONFIRMED} constant. */ + UNCONFIRMED } /** The values this version of the SDK knows, and {@code _UNKNOWN} for the others. */ @@ -186,6 +192,8 @@ public enum Value { OTHER, /** The {@code DO_NOT_RETRY} constant. */ DO_NOT_RETRY, + /** The {@code UNCONFIRMED} constant. */ + UNCONFIRMED, /** A value this version of the SDK does not know. */ _UNKNOWN }