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
16 changes: 15 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ item from that page on, and `pages()` every page, fetching the next ones on dema
the response body as received. The async client's pages have `nextPage()`, `forEach(...)`,
`forEachPage(...)` and `toList()`, returning `CompletableFuture`s.

[Add ons](#add-ons) · [Add ons entitlements](#add-ons-entitlements) · [Batch jobs](#batch-jobs) · [Budgets](#budgets) · [Checkout sessions](#checkout-sessions) · [Checks](#checks) · [Connect](#connect) · [Coupons](#coupons) · [Credit notes](#credit-notes) · [Credit units](#credit-units) · [Credit units prices](#credit-units-prices) · [Credits](#credits) · [Credits grants](#credits-grants) · [Credits wallets](#credits-wallets) · [Custom properties](#custom-properties) · [Customers](#customers) · [Entitlements](#entitlements) · [Events](#events) · [Features](#features) · [Invoices](#invoices) · [Metrics](#metrics) · [Oauth](#oauth) · [Oauth apps](#oauth-apps) · [Plans](#plans) · [Plans versions](#plans-versions) · [Product families](#product-families) · [Products](#products) · [Products entitlements](#products-entitlements) · [Subscriptions](#subscriptions) · [Usage](#usage) · [Usage customer](#usage-customer) · [Usage costs](#usage-costs) · [Usage costs customer](#usage-costs-customer) · [Usage costs subscription](#usage-costs-subscription) · [Webhook endpoints](#webhook-endpoints) · [Webhook endpoints endpoints](#webhook-endpoints-endpoints)
[Add ons](#add-ons) · [Add ons entitlements](#add-ons-entitlements) · [Batch jobs](#batch-jobs) · [Budgets](#budgets) · [Checkout sessions](#checkout-sessions) · [Checks](#checks) · [Connect](#connect) · [Coupons](#coupons) · [Credit notes](#credit-notes) · [Credit units](#credit-units) · [Credit units prices](#credit-units-prices) · [Credits](#credits) · [Credits grants](#credits-grants) · [Credits wallets](#credits-wallets) · [Custom properties](#custom-properties) · [Customers](#customers) · [Entitlements](#entitlements) · [Events](#events) · [Features](#features) · [Invoices](#invoices) · [Licenses](#licenses) · [Metrics](#metrics) · [Oauth](#oauth) · [Oauth apps](#oauth-apps) · [Plans](#plans) · [Plans versions](#plans-versions) · [Product families](#product-families) · [Products](#products) · [Products entitlements](#products-entitlements) · [Subscriptions](#subscriptions) · [Usage](#usage) · [Usage customer](#usage-customer) · [Usage costs](#usage-costs) · [Usage costs customer](#usage-costs-customer) · [Usage costs subscription](#usage-costs-subscription) · [Webhook endpoints](#webhook-endpoints) · [Webhook endpoints endpoints](#webhook-endpoints-endpoints)

## Add ons

Expand Down Expand Up @@ -238,6 +238,20 @@ the response body as received. The async client's pages have `nextPage()`, `forE
| `Invoice client.invoices().refresh(String invoiceId)` | `POST /api/v1/invoices/{invoice_id}/refresh` | [`Invoice`](src/main/java/com/meteroid/models/Invoice.java) |
| `byte[] client.invoices().downloadXml(String invoiceId)` | `GET /api/v1/invoices/{invoice_id}/xml` | bytes |

## Licenses

[`client.licenses()`](src/main/java/com/meteroid/api/Licenses.java)

| Method | Request | Returns |
| --- | --- | --- |
| `LicenseListResponse client.licenses().list([LicensesListOptions options])` | `GET /api/v1/licenses` | [`LicenseListResponse`](src/main/java/com/meteroid/models/LicenseListResponse.java) |
| `IssueLicenseResponse client.licenses().create(IssueLicenseRequest issueLicenseRequest)` | `POST /api/v1/licenses` | [`IssueLicenseResponse`](src/main/java/com/meteroid/models/IssueLicenseResponse.java) |
| `License client.licenses().retrieve(String licenseId)` | `GET /api/v1/licenses/{license_id}` | [`License`](src/main/java/com/meteroid/models/License.java) |
| `LicenseActivationCode client.licenses().retrieveActivationCode(String licenseId)` | `GET /api/v1/licenses/{license_id}/activation-code` | [`LicenseActivationCode`](src/main/java/com/meteroid/models/LicenseActivationCode.java) |
| `OfflineLicense client.licenses().offline(String licenseId, IssueOfflineLicenseRequest issueOfflineLicenseRequest)` | `POST /api/v1/licenses/{license_id}/offline` | [`OfflineLicense`](src/main/java/com/meteroid/models/OfflineLicense.java) |
| `License client.licenses().revoke(String licenseId, RevokeLicenseRequest revokeLicenseRequest)` | `POST /api/v1/licenses/{license_id}/revoke` | [`License`](src/main/java/com/meteroid/models/License.java) |
| `LicenseSigningKeysResponse client.licenses().listLicensingSigningKeys()` | `GET /api/v1/licensing/signing-keys` | [`LicenseSigningKeysResponse`](src/main/java/com/meteroid/models/LicenseSigningKeysResponse.java) |

## Metrics

[`client.metrics()`](src/main/java/com/meteroid/api/Metrics.java)
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/com/meteroid/Meteroid.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.meteroid.api.Events;
import com.meteroid.api.Features;
import com.meteroid.api.Invoices;
import com.meteroid.api.Licenses;
import com.meteroid.api.Metrics;
import com.meteroid.api.Oauth;
import com.meteroid.api.OauthApps;
Expand Down Expand Up @@ -77,6 +78,7 @@ public final class Meteroid implements AutoCloseable {
private final Events events;
private final Features features;
private final Invoices invoices;
private final Licenses licenses;
private final Metrics metrics;
private final Oauth oauth;
private final OauthApps oauthApps;
Expand Down Expand Up @@ -155,6 +157,7 @@ public Meteroid(MeteroidOptions options) {
this.events = new Events(httpClient);
this.features = new Features(httpClient);
this.invoices = new Invoices(httpClient);
this.licenses = new Licenses(httpClient);
this.metrics = new Metrics(httpClient);
this.oauth = new Oauth(httpClient);
this.oauthApps = new OauthApps(httpClient);
Expand Down Expand Up @@ -354,6 +357,15 @@ public Invoices invoices() {
return invoices;
}

/**
* The {@code licenses} operations.
*
* @return the operations
*/
public Licenses licenses() {
return licenses;
}

/**
* The {@code metrics} operations.
*
Expand Down Expand Up @@ -592,6 +604,15 @@ public Invoices.WithRawResponse invoices() {
return invoices.withRawResponse();
}

/**
* The {@code licenses} operations.
*
* @return the operations
*/
public Licenses.WithRawResponse licenses() {
return licenses.withRawResponse();
}

/**
* The {@code metrics} operations.
*
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/com/meteroid/MeteroidAsync.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.meteroid.api.EventsAsync;
import com.meteroid.api.FeaturesAsync;
import com.meteroid.api.InvoicesAsync;
import com.meteroid.api.LicensesAsync;
import com.meteroid.api.MetricsAsync;
import com.meteroid.api.OauthAppsAsync;
import com.meteroid.api.OauthAsync;
Expand Down Expand Up @@ -52,6 +53,7 @@ public final class MeteroidAsync implements AutoCloseable {
private final EventsAsync events;
private final FeaturesAsync features;
private final InvoicesAsync invoices;
private final LicensesAsync licenses;
private final MetricsAsync metrics;
private final OauthAsync oauth;
private final OauthAppsAsync oauthApps;
Expand Down Expand Up @@ -81,6 +83,7 @@ public final class MeteroidAsync implements AutoCloseable {
this.events = new EventsAsync(sync.events());
this.features = new FeaturesAsync(sync.features());
this.invoices = new InvoicesAsync(sync.invoices());
this.licenses = new LicensesAsync(sync.licenses());
this.metrics = new MetricsAsync(sync.metrics());
this.oauth = new OauthAsync(sync.oauth());
this.oauthApps = new OauthAppsAsync(sync.oauthApps());
Expand Down Expand Up @@ -256,6 +259,15 @@ public InvoicesAsync invoices() {
return invoices;
}

/**
* The {@code licenses} operations.
*
* @return the operations
*/
public LicensesAsync licenses() {
return licenses;
}

/**
* The {@code metrics} operations.
*
Expand Down Expand Up @@ -500,6 +512,15 @@ public InvoicesAsync.WithRawResponse invoices() {
return invoices.withRawResponse();
}

/**
* The {@code licenses} operations.
*
* @return the operations
*/
public LicensesAsync.WithRawResponse licenses() {
return licenses.withRawResponse();
}

/**
* The {@code metrics} operations.
*
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/com/meteroid/api/CustomProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,13 @@ MeteroidHttpClient.Exchange<CustomPropertyDefinition> exchangeCreateCustomProper
.build();
return client.call("POST", url)
.json(customPropertyDefinitionCreateRequest)
.errors(com.meteroid.models.RestErrorResponse.class, "400", "409", "429", "500")
.errors(
com.meteroid.models.RestErrorResponse.class,
"400",
"403",
"409",
"429",
"500")
.options(requestOptions)
.returning(CustomPropertyDefinition.class);
}
Expand Down Expand Up @@ -284,7 +290,7 @@ MeteroidHttpClient.Exchange<CustomPropertyDefinition> exchangeUpdateCustomProper
.build();
return client.call("PUT", url)
.json(customPropertyDefinitionUpdateRequest)
.errors(com.meteroid.models.RestErrorResponse.class, "404", "429", "500")
.errors(com.meteroid.models.RestErrorResponse.class, "403", "404", "429", "500")
.options(requestOptions)
.returning(CustomPropertyDefinition.class);
}
Expand Down
Loading
Loading