diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 67bccf0d..24ea7198 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,12 +1,14 @@
name: CI
on:
push:
- branches-ignore:
- - 'generated'
- - 'codegen/**'
- - 'integrated/**'
- - 'stl-preview-head/**'
- - 'stl-preview-base/**'
+ branches:
+ - '**'
+ - '!integrated/**'
+ - '!stl-preview-head/**'
+ - '!stl-preview-base/**'
+ - '!generated'
+ - '!codegen/**'
+ - 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
@@ -16,14 +18,14 @@ jobs:
lint:
timeout-minutes: 15
name: lint
- runs-on: ${{ github.repository == 'stainless-sdks/m3ter-sdk-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
- if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
+ runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Java
- uses: actions/setup-java@v5
+ uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: |
@@ -32,7 +34,7 @@ jobs:
cache: gradle
- name: Set up Gradle
- uses: gradle/actions/setup-gradle@v4
+ uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3
- name: Run lints
run: ./scripts/lint
@@ -43,14 +45,14 @@ jobs:
permissions:
contents: read
id-token: write
- runs-on: ${{ github.repository == 'stainless-sdks/m3ter-sdk-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
- if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
+ runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Java
- uses: actions/setup-java@v5
+ uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: |
@@ -59,20 +61,24 @@ jobs:
cache: gradle
- name: Set up Gradle
- uses: gradle/actions/setup-gradle@v4
+ uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3
- name: Build SDK
run: ./scripts/build
- name: Get GitHub OIDC Token
- if: github.repository == 'stainless-sdks/m3ter-sdk-java'
+ if: |-
+ github.repository == 'stainless-sdks/m3ter-sdk-java' &&
+ !startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
- uses: actions/github-script@v8
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());
- name: Build and upload Maven artifacts
- if: github.repository == 'stainless-sdks/m3ter-sdk-java'
+ if: |-
+ github.repository == 'stainless-sdks/m3ter-sdk-java' &&
+ !startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
@@ -82,13 +88,13 @@ jobs:
test:
timeout-minutes: 15
name: test
- runs-on: ${{ github.repository == 'stainless-sdks/m3ter-sdk-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Java
- uses: actions/setup-java@v5
+ uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: |
@@ -97,7 +103,7 @@ jobs:
cache: gradle
- name: Set up Gradle
- uses: gradle/gradle-build-action@v2
+ uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
- name: Run tests
run: ./scripts/test
diff --git a/.github/workflows/publish-sonatype.yml b/.github/workflows/publish-sonatype.yml
index e16cf0d6..cb6d035a 100644
--- a/.github/workflows/publish-sonatype.yml
+++ b/.github/workflows/publish-sonatype.yml
@@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Java
- uses: actions/setup-java@v5
+ uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: |
@@ -26,7 +26,7 @@ jobs:
cache: gradle
- name: Set up Gradle
- uses: gradle/gradle-build-action@v2
+ uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
- name: Publish to Sonatype
run: |-
diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml
index 45b2a3fc..bf0d0bef 100644
--- a/.github/workflows/release-doctor.yml
+++ b/.github/workflows/release-doctor.yml
@@ -12,7 +12,7 @@ jobs:
if: github.repository == 'm3ter-com/m3ter-sdk-java' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Check release environment
run: |
diff --git a/.gitignore b/.gitignore
index b1346e6d..90b85e94 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
.prism.log
+.stdy.log
.gradle
.idea
.kotlin
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 2aca35ae..4208b5cb 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.5.0"
+ ".": "0.6.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 03f6cdbe..ba1032d6 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 286
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/rg%2Fm3ter-sdk-9518109ea0b24bfbc86fe686fc43cab13182b93d174928a28dcd367eb73fce30.yml
-openapi_spec_hash: dba933943876f28268bd8220d9af8ffe
-config_hash: 10410ec7acfbc33ee5116775c6714440
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/rg/m3ter-sdk-8ed00aff39e19053e35301d739d96ff2bafb352273d647c86073ca879a1dad3f.yml
+openapi_spec_hash: 3e75a21276e7cd06944188f512a7a4e3
+config_hash: 5de7039a6202fb360a3970934cffb50e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 38bcda28..471f8be0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,75 @@
# Changelog
+## 0.6.0 (2026-07-17)
+
+Full Changelog: [v0.5.0...v0.6.0](https://github.com/m3ter-com/m3ter-sdk-java/compare/v0.5.0...v0.6.0)
+
+### Features
+
+* **api:** switch to TypeScript SDK ([00e3a4d](https://github.com/m3ter-com/m3ter-sdk-java/commit/00e3a4ddcf414578153e20a76bb0c46aebd3f631))
+* **api:** Updating OpenAPI Spec ([6bfc0b0](https://github.com/m3ter-com/m3ter-sdk-java/commit/6bfc0b03dcbfa6e32ae1931db999acdd606e5996))
+* **client:** add connection pooling option ([4431d4b](https://github.com/m3ter-com/m3ter-sdk-java/commit/4431d4b3819146e68ace77675ab5ae66d7122f7e))
+* **client:** add more convenience service method overloads ([0600cd9](https://github.com/m3ter-com/m3ter-sdk-java/commit/0600cd95034d92b2916278a25d21e85e8d5cbd1c))
+* **client:** improve logging ([bf27118](https://github.com/m3ter-com/m3ter-sdk-java/commit/bf27118dac6cb0fd1747d50fe14c743f2c13ea9d))
+* **client:** more robust error parsing ([1245a24](https://github.com/m3ter-com/m3ter-sdk-java/commit/1245a244af0d73a59f3a935f17b00cd29d0bc029))
+* **client:** support proxy authentication ([29f8806](https://github.com/m3ter-com/m3ter-sdk-java/commit/29f88060572361f97d0bdcef4460a7b4105fbaa1))
+* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([445ed24](https://github.com/m3ter-com/m3ter-sdk-java/commit/445ed24dcc6f9fae32962670a5bed0241998b53e))
+* support setting headers via env ([6e61838](https://github.com/m3ter-com/m3ter-sdk-java/commit/6e61838b8e2b70f18d8d5c046c95f557061a763f))
+
+
+### Bug Fixes
+
+* **client:** allow updating header/query affecting fields in `toBuilder()` ([23e28b9](https://github.com/m3ter-com/m3ter-sdk-java/commit/23e28b93c743ee33084c61ddf28d1835c2035989))
+* **client:** incorrect `Retry-After` parsing ([98eb243](https://github.com/m3ter-com/m3ter-sdk-java/commit/98eb243707f436021e407af224c6ee8b5cef68a7))
+* fix request delays for retrying to be more respectful of high requested delays ([4d30cf2](https://github.com/m3ter-com/m3ter-sdk-java/commit/4d30cf223b7fafed53efeefb8d71f6e16ba1e85c))
+
+
+### Performance Improvements
+
+* **client:** create one json mapper ([cc8caef](https://github.com/m3ter-com/m3ter-sdk-java/commit/cc8caef47f1f23bdb9148430a3d03c1d9f2be218))
+
+
+### Chores
+
+* **api:** minor updates ([772bc48](https://github.com/m3ter-com/m3ter-sdk-java/commit/772bc48f2a9baeba9b44a4ba82019dbd958536e3))
+* **ci:** skip lint on metadata-only changes ([51d499d](https://github.com/m3ter-com/m3ter-sdk-java/commit/51d499dbfbf91560bb9189f065af734e47db79a8))
+* **ci:** skip uploading artifacts on stainless-internal branches ([f2bbdf2](https://github.com/m3ter-com/m3ter-sdk-java/commit/f2bbdf2812298cda533417925fd5dee2a510c33a))
+* **docs:** add missing descriptions ([5f93a31](https://github.com/m3ter-com/m3ter-sdk-java/commit/5f93a31105cda6fe6fb174477d21ba8d1611ec9c))
+* drop apache dependency ([d009b12](https://github.com/m3ter-com/m3ter-sdk-java/commit/d009b1246a2a8bec2488a48a43bce4f8613834fa))
+* **internal:** allow passing args to `./scripts/test` ([8fe5d12](https://github.com/m3ter-com/m3ter-sdk-java/commit/8fe5d12d621bb65422e5986710c416a2a1c148c7))
+* **internal:** bump palantir-java-format ([d6c4fe1](https://github.com/m3ter-com/m3ter-sdk-java/commit/d6c4fe1d68920d0611108b9cc18b482e6efe44f6))
+* **internal:** codegen related update ([c542fc1](https://github.com/m3ter-com/m3ter-sdk-java/commit/c542fc1081f666d1b960614c97bd96664adcaf11))
+* **internal:** expand imports ([f21304b](https://github.com/m3ter-com/m3ter-sdk-java/commit/f21304b3bf5818a6b3780fd67f1e0eb714e1b72f))
+* **internal:** make `OkHttp` constructor internal ([4b5dd36](https://github.com/m3ter-com/m3ter-sdk-java/commit/4b5dd368200a2cde70f188942870496bb6751a98))
+* **internal:** tweak CI branches ([fafe209](https://github.com/m3ter-com/m3ter-sdk-java/commit/fafe209aac854fbf41b6505261ee9f5336116e32))
+* **internal:** update `TestServerExtension` comment ([ad05532](https://github.com/m3ter-com/m3ter-sdk-java/commit/ad0553241adc7bda3de9496b0bba3f22c1352150))
+* **internal:** update gitignore ([ba55586](https://github.com/m3ter-com/m3ter-sdk-java/commit/ba55586df3020053f77e852e8fb3fe230e05a1fd))
+* **internal:** update multipart form array serialization ([9547be4](https://github.com/m3ter-com/m3ter-sdk-java/commit/9547be40bc79fa2d261df2c4f2ece9e99c24e017))
+* **internal:** update retry delay tests ([2a9bbb0](https://github.com/m3ter-com/m3ter-sdk-java/commit/2a9bbb0136b800a4b79a41993c0e919f1899438f))
+* **internal:** upgrade AssertJ ([fea9d8f](https://github.com/m3ter-com/m3ter-sdk-java/commit/fea9d8f96052af844b1e0ff2901cb7c42a7f8e8e))
+* make `Properties` more resilient to `null` ([8edff6d](https://github.com/m3ter-com/m3ter-sdk-java/commit/8edff6d5b98722338fc7e9ac73e27327b2f168e5))
+* redact api-key headers in debug logs ([b4b1d00](https://github.com/m3ter-com/m3ter-sdk-java/commit/b4b1d00b21e00cbd38d4d2f2cb75c4e201a0a50a))
+* remove duplicated dokka setup ([15f81b8](https://github.com/m3ter-com/m3ter-sdk-java/commit/15f81b8f347c9f99eb47ba6acc7cc8c0bb2a9a7d))
+* **test:** do not count install time for mock server timeout ([16c7b01](https://github.com/m3ter-com/m3ter-sdk-java/commit/16c7b015ff0e76b7e74797156d627dd616e00131))
+* **tests:** bump steady to v0.19.4 ([c3e395b](https://github.com/m3ter-com/m3ter-sdk-java/commit/c3e395be4903bb486ccbf7aaaf871b8703e1d97a))
+* **tests:** bump steady to v0.19.5 ([59e2eef](https://github.com/m3ter-com/m3ter-sdk-java/commit/59e2eefaa12334d4880f4c79afbe6e163594dca7))
+* **tests:** bump steady to v0.19.6 ([8dbf4e9](https://github.com/m3ter-com/m3ter-sdk-java/commit/8dbf4e9963758678d779028fd42d813efd18caea))
+* **tests:** bump steady to v0.19.7 ([688e7f5](https://github.com/m3ter-com/m3ter-sdk-java/commit/688e7f5c117cb3aa6d3673cb624cee90f40fe10d))
+* **tests:** bump steady to v0.20.1 ([861f3b1](https://github.com/m3ter-com/m3ter-sdk-java/commit/861f3b1b1e6b3bd0ce23200363d9aebad2af402c))
+* **tests:** bump steady to v0.20.2 ([9b44f27](https://github.com/m3ter-com/m3ter-sdk-java/commit/9b44f279868a9da1de2be05b4f9254cf6a2d0bc4))
+* **tests:** bump steady to v0.22.1 ([d433325](https://github.com/m3ter-com/m3ter-sdk-java/commit/d43332544992320a0735fbbb3b9a2e507dbc6b0b))
+
+
+### Documentation
+
+* clarify forwards compat behavior ([d606f57](https://github.com/m3ter-com/m3ter-sdk-java/commit/d606f57d6f2d736abc4c3924765f49b8d48763ee))
+* simplify examples ([d36ba16](https://github.com/m3ter-com/m3ter-sdk-java/commit/d36ba162328c19f7083747dc9243992fbeea4dab))
+
+
+### Refactors
+
+* **tests:** switch from prism to steady ([84e83ad](https://github.com/m3ter-com/m3ter-sdk-java/commit/84e83adb56128782908a5d218c94c664173b16f8))
+
## 0.5.0 (2026-01-29)
Full Changelog: [v0.4.0...v0.5.0](https://github.com/m3ter-com/m3ter-sdk-java/compare/v0.4.0...v0.5.0)
diff --git a/README.md b/README.md
index ceb13a6f..38188c6a 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.m3ter/sdk-java/0.5.0)
-[](https://javadoc.io/doc/com.m3ter/sdk-java/0.5.0)
+[](https://central.sonatype.com/artifact/com.m3ter/sdk-java/0.6.0)
+[](https://javadoc.io/doc/com.m3ter/sdk-java/0.6.0)
@@ -11,18 +11,9 @@ The M3ter Java SDK provides convenient access to the [M3ter REST API](https://ww
It is generated with [Stainless](https://www.stainless.com/).
-## MCP Server
-
-Use the M3ter MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
-
-[](https://cursor.com/en-US/install-mcp?name=m3ter-sdk-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm0zdGVyLXNkay1tY3AiXSwiZW52Ijp7Ik0zVEVSX0FQSV9LRVkiOiJNeSBBUEkgS2V5IiwiTTNURVJfQVBJX1NFQ1JFVCI6Ik15IEFQSSBTZWNyZXQiLCJNM1RFUl9BUElfVE9LRU4iOiJNeSBUb2tlbiIsIk0zVEVSX09SR19JRCI6Ik15IE9yZyBJRCJ9fQ)
-[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22m3ter-sdk-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22m3ter-sdk-mcp%22%5D%2C%22env%22%3A%7B%22M3TER_API_KEY%22%3A%22My%20API%20Key%22%2C%22M3TER_API_SECRET%22%3A%22My%20API%20Secret%22%2C%22M3TER_API_TOKEN%22%3A%22My%20Token%22%2C%22M3TER_ORG_ID%22%3A%22My%20Org%20ID%22%7D%7D)
-
-> Note: You may need to set environment variables in your MCP client.
-
-The REST API documentation can be found on [www.m3ter.com](https://www.m3ter.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.m3ter/sdk-java/0.5.0).
+The REST API documentation can be found on [www.m3ter.com](https://www.m3ter.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.m3ter/sdk-java/0.6.0).
@@ -33,7 +24,7 @@ The REST API documentation can be found on [www.m3ter.com](https://www.m3ter.com
### Gradle
```kotlin
-implementation("com.m3ter:sdk-java:0.5.0")
+implementation("com.m3ter:sdk-java:0.6.0")
```
### Maven
@@ -42,7 +33,7 @@ implementation("com.m3ter:sdk-java:0.5.0")
com.m3ter
sdk-java
- 0.5.0
+ 0.6.0
```
@@ -64,10 +55,7 @@ import com.m3ter.models.ProductListParams;
// Or configures using the `M3TER_API_KEY`, `M3TER_API_SECRET`, `M3TER_API_TOKEN`, `M3TER_ORG_ID` and `M3TER_BASE_URL` environment variables
M3terClient client = M3terOkHttpClient.fromEnv();
-ProductListParams params = ProductListParams.builder()
- .orgId("My Org ID")
- .build();
-ProductListPage page = client.products().list(params);
+ProductListPage page = client.products().list();
```
## Client configuration
@@ -170,10 +158,7 @@ import java.util.concurrent.CompletableFuture;
// Or configures using the `M3TER_API_KEY`, `M3TER_API_SECRET`, `M3TER_API_TOKEN`, `M3TER_ORG_ID` and `M3TER_BASE_URL` environment variables
M3terClient client = M3terOkHttpClient.fromEnv();
-ProductListParams params = ProductListParams.builder()
- .orgId("My Org ID")
- .build();
-CompletableFuture page = client.async().products().list(params);
+CompletableFuture page = client.async().products().list();
```
Or create an asynchronous client from the beginning:
@@ -189,10 +174,7 @@ import java.util.concurrent.CompletableFuture;
// Or configures using the `M3TER_API_KEY`, `M3TER_API_SECRET`, `M3TER_API_TOKEN`, `M3TER_ORG_ID` and `M3TER_BASE_URL` environment variables
M3terClientAsync client = M3terOkHttpClientAsync.fromEnv();
-ProductListParams params = ProductListParams.builder()
- .orgId("My Org ID")
- .build();
-CompletableFuture page = client.products().list(params);
+CompletableFuture page = client.products().list();
```
The asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.
@@ -353,8 +335,6 @@ while (true) {
## Logging
-The SDK uses the standard [OkHttp logging interceptor](https://github.com/square/okhttp/tree/master/okhttp-logging-interceptor).
-
Enable logging by setting the `M3TER_LOG` environment variable to `info`:
```sh
@@ -367,6 +347,19 @@ Or to `debug` for more verbose logging:
export M3TER_LOG=debug
```
+Or configure the client manually using the `logLevel` method:
+
+```java
+import com.m3ter.client.M3terClient;
+import com.m3ter.client.okhttp.M3terOkHttpClient;
+import com.m3ter.core.LogLevel;
+
+M3terClient client = M3terOkHttpClient.builder()
+ .fromEnv()
+ .logLevel(LogLevel.INFO)
+ .build();
+```
+
## ProGuard and R8
Although the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `sdk-java-core` is published with a [configuration file](sdk-java-core/src/main/resources/META-INF/proguard/sdk-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).
@@ -459,6 +452,40 @@ M3terClient client = M3terOkHttpClient.builder()
.build();
```
+If the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:
+
+```java
+import com.m3ter.client.M3terClient;
+import com.m3ter.client.okhttp.M3terOkHttpClient;
+import com.m3ter.core.http.ProxyAuthenticator;
+
+M3terClient client = M3terOkHttpClient.builder()
+ .fromEnv()
+ .proxy(...)
+ // Or a custom implementation of `ProxyAuthenticator`.
+ .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))
+ .build();
+```
+
+### Connection pooling
+
+To customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:
+
+```java
+import com.m3ter.client.M3terClient;
+import com.m3ter.client.okhttp.M3terOkHttpClient;
+import java.time.Duration;
+
+M3terClient client = M3terOkHttpClient.builder()
+ .fromEnv()
+ // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.
+ .maxIdleConnections(10)
+ .keepAliveDuration(Duration.ofMinutes(2))
+ .build();
+```
+
+If both options are unset, OkHttp's default connection pool settings are used.
+
### HTTPS
> [!NOTE]
@@ -676,7 +703,9 @@ In rare cases, the API may return a response that doesn't match the expected typ
By default, the SDK will not throw an exception in this case. It will throw [`M3terInvalidDataException`](sdk-java-core/src/main/kotlin/com/m3ter/errors/M3terInvalidDataException.kt) only if you directly access the property.
-If you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:
+Validating the response is _not_ forwards compatible with new types from the API for existing fields.
+
+If you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:
```java
import com.m3ter.models.AuthenticationGetBearerTokenResponse;
diff --git a/build.gradle.kts b/build.gradle.kts
index b03c5bff..12a47af9 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -9,7 +9,7 @@ repositories {
allprojects {
group = "com.m3ter"
- version = "0.5.0" // x-release-please-version
+ version = "0.6.0" // x-release-please-version
}
subprojects {
@@ -22,7 +22,6 @@ subprojects {
group = "Verification"
description = "Verifies all source files are formatted."
}
- apply(plugin = "org.jetbrains.dokka")
}
subprojects {
diff --git a/buildSrc/src/main/kotlin/m3ter.java.gradle.kts b/buildSrc/src/main/kotlin/m3ter.java.gradle.kts
index 70fc33f4..8f4f902a 100644
--- a/buildSrc/src/main/kotlin/m3ter.java.gradle.kts
+++ b/buildSrc/src/main/kotlin/m3ter.java.gradle.kts
@@ -45,7 +45,7 @@ tasks.withType().configureEach {
val palantir by configurations.creating
dependencies {
- palantir("com.palantir.javaformat:palantir-java-format:2.73.0")
+ palantir("com.palantir.javaformat:palantir-java-format:2.89.0")
}
fun registerPalantir(
diff --git a/buildSrc/src/main/kotlin/m3ter.kotlin.gradle.kts b/buildSrc/src/main/kotlin/m3ter.kotlin.gradle.kts
index 5d32ad69..e708588c 100644
--- a/buildSrc/src/main/kotlin/m3ter.kotlin.gradle.kts
+++ b/buildSrc/src/main/kotlin/m3ter.kotlin.gradle.kts
@@ -40,7 +40,7 @@ tasks.withType().configureEach {
val ktfmt by configurations.creating
dependencies {
- ktfmt("com.facebook:ktfmt:0.56")
+ ktfmt("com.facebook:ktfmt:0.61")
}
fun registerKtfmt(
diff --git a/scripts/build b/scripts/build
index f4063482..16a2b00d 100755
--- a/scripts/build
+++ b/scripts/build
@@ -5,4 +5,4 @@ set -e
cd "$(dirname "$0")/.."
echo "==> Building classes"
-./gradlew build testClasses -x test
+./gradlew build testClasses "$@" -x test
diff --git a/scripts/fast-format b/scripts/fast-format
index 1b3bc473..35a1dee2 100755
--- a/scripts/fast-format
+++ b/scripts/fast-format
@@ -24,8 +24,8 @@ if [ ! -f "$FILE_LIST" ]; then
exit 1
fi
-if ! command -v ktfmt-fast-format &> /dev/null; then
- echo "Error: ktfmt-fast-format not found"
+if ! command -v ktfmt &> /dev/null; then
+ echo "Error: ktfmt not found"
exit 1
fi
@@ -36,7 +36,7 @@ echo "==> Done looking for Kotlin files"
if [[ -n "$kt_files" ]]; then
echo "==> will format Kotlin files"
- echo "$kt_files" | tr '\n' '\0' | xargs -0 ktfmt-fast-format --kotlinlang-style "$@"
+ echo "$kt_files" | tr '\n' '\0' | xargs -0 ktfmt --kotlinlang-style "$@"
else
echo "No Kotlin files to format -- expected outcome during incremental formatting"
fi
diff --git a/scripts/mock b/scripts/mock
index 0b28f6ea..feebe5ed 100755
--- a/scripts/mock
+++ b/scripts/mock
@@ -19,23 +19,34 @@ fi
echo "==> Starting mock server with URL ${URL}"
-# Run prism mock on the given spec
+# Run steady mock on the given spec
if [ "$1" == "--daemon" ]; then
- npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
+ # Pre-install the package so the download doesn't eat into the startup timeout
+ npm exec --package=@stdy/cli@0.22.1 -- steady --version
- # Wait for server to come online
+ npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log &
+
+ # Wait for server to come online via health endpoint (max 30s)
echo -n "Waiting for server"
- while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
+ attempts=0
+ while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do
+ if ! kill -0 $! 2>/dev/null; then
+ echo
+ cat .stdy.log
+ exit 1
+ fi
+ attempts=$((attempts + 1))
+ if [ "$attempts" -ge 300 ]; then
+ echo
+ echo "Timed out waiting for Steady server to start"
+ cat .stdy.log
+ exit 1
+ fi
echo -n "."
sleep 0.1
done
- if grep -q "✖ fatal" ".prism.log"; then
- cat .prism.log
- exit 1
- fi
-
echo
else
- npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
+ npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL"
fi
diff --git a/scripts/test b/scripts/test
index 047bc1db..7d7f08e3 100755
--- a/scripts/test
+++ b/scripts/test
@@ -9,8 +9,8 @@ GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
-function prism_is_running() {
- curl --silent "http://localhost:4010" >/dev/null 2>&1
+function steady_is_running() {
+ curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1
}
kill_server_on_port() {
@@ -25,7 +25,7 @@ function is_overriding_api_base_url() {
[ -n "$TEST_API_BASE_URL" ]
}
-if ! is_overriding_api_base_url && ! prism_is_running ; then
+if ! is_overriding_api_base_url && ! steady_is_running ; then
# When we exit this script, make sure to kill the background mock server process
trap 'kill_server_on_port 4010' EXIT
@@ -36,19 +36,19 @@ fi
if is_overriding_api_base_url ; then
echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
echo
-elif ! prism_is_running ; then
- echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
+elif ! steady_is_running ; then
+ echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Steady server"
echo -e "running against your OpenAPI spec."
echo
echo -e "To run the server, pass in the path or url of your OpenAPI"
- echo -e "spec to the prism command:"
+ echo -e "spec to the steady command:"
echo
- echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
+ echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.22.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}"
echo
exit 1
else
- echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}"
+ echo -e "${GREEN}✔ Mock steady server is running with your OpenAPI spec${NC}"
echo
fi
diff --git a/sdk-java-client-okhttp/build.gradle.kts b/sdk-java-client-okhttp/build.gradle.kts
index 9f4bcb92..b382f77e 100644
--- a/sdk-java-client-okhttp/build.gradle.kts
+++ b/sdk-java-client-okhttp/build.gradle.kts
@@ -7,9 +7,8 @@ dependencies {
api(project(":sdk-java-core"))
implementation("com.squareup.okhttp3:okhttp:4.12.0")
- implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
testImplementation(kotlin("test"))
- testImplementation("org.assertj:assertj-core:3.25.3")
+ testImplementation("org.assertj:assertj-core:3.27.7")
testImplementation("com.github.tomakehurst:wiremock-jre8:2.35.2")
}
diff --git a/sdk-java-client-okhttp/src/main/kotlin/com/m3ter/client/okhttp/M3terOkHttpClient.kt b/sdk-java-client-okhttp/src/main/kotlin/com/m3ter/client/okhttp/M3terOkHttpClient.kt
index 6ed7a701..4be72191 100644
--- a/sdk-java-client-okhttp/src/main/kotlin/com/m3ter/client/okhttp/M3terOkHttpClient.kt
+++ b/sdk-java-client-okhttp/src/main/kotlin/com/m3ter/client/okhttp/M3terOkHttpClient.kt
@@ -6,11 +6,13 @@ import com.fasterxml.jackson.databind.json.JsonMapper
import com.m3ter.client.M3terClient
import com.m3ter.client.M3terClientImpl
import com.m3ter.core.ClientOptions
+import com.m3ter.core.LogLevel
import com.m3ter.core.Sleeper
import com.m3ter.core.Timeout
import com.m3ter.core.http.AsyncStreamResponse
import com.m3ter.core.http.Headers
import com.m3ter.core.http.HttpClient
+import com.m3ter.core.http.ProxyAuthenticator
import com.m3ter.core.http.QueryParams
import com.m3ter.core.jsonMapper
import java.net.Proxy
@@ -49,6 +51,9 @@ class M3terOkHttpClient private constructor() {
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
private var dispatcherExecutorService: ExecutorService? = null
private var proxy: Proxy? = null
+ private var proxyAuthenticator: ProxyAuthenticator? = null
+ private var maxIdleConnections: Int? = null
+ private var keepAliveDuration: Duration? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
private var hostnameVerifier: HostnameVerifier? = null
@@ -77,6 +82,60 @@ class M3terOkHttpClient private constructor() {
/** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */
fun proxy(proxy: Optional) = proxy(proxy.getOrNull())
+ /**
+ * Provides credentials when an HTTP proxy responds with `407 Proxy Authentication
+ * Required`.
+ */
+ fun proxyAuthenticator(proxyAuthenticator: ProxyAuthenticator?) = apply {
+ this.proxyAuthenticator = proxyAuthenticator
+ }
+
+ /**
+ * Alias for calling [Builder.proxyAuthenticator] with `proxyAuthenticator.orElse(null)`.
+ */
+ fun proxyAuthenticator(proxyAuthenticator: Optional) =
+ proxyAuthenticator(proxyAuthenticator.getOrNull())
+
+ /**
+ * The maximum number of idle connections kept by the underlying OkHttp connection pool.
+ *
+ * If this is set, then [keepAliveDuration] must also be set.
+ *
+ * If unset, then OkHttp's default is used.
+ */
+ fun maxIdleConnections(maxIdleConnections: Int?) = apply {
+ this.maxIdleConnections = maxIdleConnections
+ }
+
+ /**
+ * Alias for [Builder.maxIdleConnections].
+ *
+ * This unboxed primitive overload exists for backwards compatibility.
+ */
+ fun maxIdleConnections(maxIdleConnections: Int) =
+ maxIdleConnections(maxIdleConnections as Int?)
+
+ /**
+ * Alias for calling [Builder.maxIdleConnections] with `maxIdleConnections.orElse(null)`.
+ */
+ fun maxIdleConnections(maxIdleConnections: Optional) =
+ maxIdleConnections(maxIdleConnections.getOrNull())
+
+ /**
+ * The keep-alive duration for idle connections in the underlying OkHttp connection pool.
+ *
+ * If this is set, then [maxIdleConnections] must also be set.
+ *
+ * If unset, then OkHttp's default is used.
+ */
+ fun keepAliveDuration(keepAliveDuration: Duration?) = apply {
+ this.keepAliveDuration = keepAliveDuration
+ }
+
+ /** Alias for calling [Builder.keepAliveDuration] with `keepAliveDuration.orElse(null)`. */
+ fun keepAliveDuration(keepAliveDuration: Optional) =
+ keepAliveDuration(keepAliveDuration.getOrNull())
+
/**
* The socket factory used to secure HTTPS connections.
*
@@ -188,6 +247,9 @@ class M3terOkHttpClient private constructor() {
/**
* Whether to call `validate` on every response before returning it.
*
+ * Setting this to `true` is _not_ forwards compatible with new types from the API for
+ * existing fields.
+ *
* Defaults to false, which means the shape of the response will not be validated upfront.
* Instead, validation will only occur for the parts of the response that are accessed.
*/
@@ -229,6 +291,15 @@ class M3terOkHttpClient private constructor() {
*/
fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) }
+ /**
+ * The level at which to log request and response information.
+ *
+ * [fromEnv] will set the level from environment variables. See [LogLevel.fromEnv].
+ *
+ * Defaults to [LogLevel.fromEnv].
+ */
+ fun logLevel(logLevel: LogLevel) = apply { clientOptions.logLevel(logLevel) }
+
fun apiKey(apiKey: String) = apply { clientOptions.apiKey(apiKey) }
fun apiSecret(apiSecret: String) = apply { clientOptions.apiSecret(apiSecret) }
@@ -339,6 +410,9 @@ class M3terOkHttpClient private constructor() {
OkHttpClient.builder()
.timeout(clientOptions.timeout())
.proxy(proxy)
+ .proxyAuthenticator(proxyAuthenticator)
+ .maxIdleConnections(maxIdleConnections)
+ .keepAliveDuration(keepAliveDuration)
.dispatcherExecutorService(dispatcherExecutorService)
.sslSocketFactory(sslSocketFactory)
.trustManager(trustManager)
diff --git a/sdk-java-client-okhttp/src/main/kotlin/com/m3ter/client/okhttp/M3terOkHttpClientAsync.kt b/sdk-java-client-okhttp/src/main/kotlin/com/m3ter/client/okhttp/M3terOkHttpClientAsync.kt
index 949642e6..cda41a1f 100644
--- a/sdk-java-client-okhttp/src/main/kotlin/com/m3ter/client/okhttp/M3terOkHttpClientAsync.kt
+++ b/sdk-java-client-okhttp/src/main/kotlin/com/m3ter/client/okhttp/M3terOkHttpClientAsync.kt
@@ -6,11 +6,13 @@ import com.fasterxml.jackson.databind.json.JsonMapper
import com.m3ter.client.M3terClientAsync
import com.m3ter.client.M3terClientAsyncImpl
import com.m3ter.core.ClientOptions
+import com.m3ter.core.LogLevel
import com.m3ter.core.Sleeper
import com.m3ter.core.Timeout
import com.m3ter.core.http.AsyncStreamResponse
import com.m3ter.core.http.Headers
import com.m3ter.core.http.HttpClient
+import com.m3ter.core.http.ProxyAuthenticator
import com.m3ter.core.http.QueryParams
import com.m3ter.core.jsonMapper
import java.net.Proxy
@@ -49,6 +51,9 @@ class M3terOkHttpClientAsync private constructor() {
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
private var dispatcherExecutorService: ExecutorService? = null
private var proxy: Proxy? = null
+ private var proxyAuthenticator: ProxyAuthenticator? = null
+ private var maxIdleConnections: Int? = null
+ private var keepAliveDuration: Duration? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
private var hostnameVerifier: HostnameVerifier? = null
@@ -77,6 +82,60 @@ class M3terOkHttpClientAsync private constructor() {
/** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */
fun proxy(proxy: Optional) = proxy(proxy.getOrNull())
+ /**
+ * Provides credentials when an HTTP proxy responds with `407 Proxy Authentication
+ * Required`.
+ */
+ fun proxyAuthenticator(proxyAuthenticator: ProxyAuthenticator?) = apply {
+ this.proxyAuthenticator = proxyAuthenticator
+ }
+
+ /**
+ * Alias for calling [Builder.proxyAuthenticator] with `proxyAuthenticator.orElse(null)`.
+ */
+ fun proxyAuthenticator(proxyAuthenticator: Optional) =
+ proxyAuthenticator(proxyAuthenticator.getOrNull())
+
+ /**
+ * The maximum number of idle connections kept by the underlying OkHttp connection pool.
+ *
+ * If this is set, then [keepAliveDuration] must also be set.
+ *
+ * If unset, then OkHttp's default is used.
+ */
+ fun maxIdleConnections(maxIdleConnections: Int?) = apply {
+ this.maxIdleConnections = maxIdleConnections
+ }
+
+ /**
+ * Alias for [Builder.maxIdleConnections].
+ *
+ * This unboxed primitive overload exists for backwards compatibility.
+ */
+ fun maxIdleConnections(maxIdleConnections: Int) =
+ maxIdleConnections(maxIdleConnections as Int?)
+
+ /**
+ * Alias for calling [Builder.maxIdleConnections] with `maxIdleConnections.orElse(null)`.
+ */
+ fun maxIdleConnections(maxIdleConnections: Optional) =
+ maxIdleConnections(maxIdleConnections.getOrNull())
+
+ /**
+ * The keep-alive duration for idle connections in the underlying OkHttp connection pool.
+ *
+ * If this is set, then [maxIdleConnections] must also be set.
+ *
+ * If unset, then OkHttp's default is used.
+ */
+ fun keepAliveDuration(keepAliveDuration: Duration?) = apply {
+ this.keepAliveDuration = keepAliveDuration
+ }
+
+ /** Alias for calling [Builder.keepAliveDuration] with `keepAliveDuration.orElse(null)`. */
+ fun keepAliveDuration(keepAliveDuration: Optional) =
+ keepAliveDuration(keepAliveDuration.getOrNull())
+
/**
* The socket factory used to secure HTTPS connections.
*
@@ -188,6 +247,9 @@ class M3terOkHttpClientAsync private constructor() {
/**
* Whether to call `validate` on every response before returning it.
*
+ * Setting this to `true` is _not_ forwards compatible with new types from the API for
+ * existing fields.
+ *
* Defaults to false, which means the shape of the response will not be validated upfront.
* Instead, validation will only occur for the parts of the response that are accessed.
*/
@@ -229,6 +291,15 @@ class M3terOkHttpClientAsync private constructor() {
*/
fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) }
+ /**
+ * The level at which to log request and response information.
+ *
+ * [fromEnv] will set the level from environment variables. See [LogLevel.fromEnv].
+ *
+ * Defaults to [LogLevel.fromEnv].
+ */
+ fun logLevel(logLevel: LogLevel) = apply { clientOptions.logLevel(logLevel) }
+
fun apiKey(apiKey: String) = apply { clientOptions.apiKey(apiKey) }
fun apiSecret(apiSecret: String) = apply { clientOptions.apiSecret(apiSecret) }
@@ -339,6 +410,9 @@ class M3terOkHttpClientAsync private constructor() {
OkHttpClient.builder()
.timeout(clientOptions.timeout())
.proxy(proxy)
+ .proxyAuthenticator(proxyAuthenticator)
+ .maxIdleConnections(maxIdleConnections)
+ .keepAliveDuration(keepAliveDuration)
.dispatcherExecutorService(dispatcherExecutorService)
.sslSocketFactory(sslSocketFactory)
.trustManager(trustManager)
diff --git a/sdk-java-client-okhttp/src/main/kotlin/com/m3ter/client/okhttp/OkHttpClient.kt b/sdk-java-client-okhttp/src/main/kotlin/com/m3ter/client/okhttp/OkHttpClient.kt
index 28b81636..e70819cd 100644
--- a/sdk-java-client-okhttp/src/main/kotlin/com/m3ter/client/okhttp/OkHttpClient.kt
+++ b/sdk-java-client-okhttp/src/main/kotlin/com/m3ter/client/okhttp/OkHttpClient.kt
@@ -8,20 +8,26 @@ import com.m3ter.core.http.HttpMethod
import com.m3ter.core.http.HttpRequest
import com.m3ter.core.http.HttpRequestBody
import com.m3ter.core.http.HttpResponse
+import com.m3ter.core.http.ProxyAuthenticator
import com.m3ter.errors.M3terIoException
import java.io.IOException
import java.io.InputStream
+import java.io.OutputStream
import java.net.Proxy
import java.time.Duration
import java.util.concurrent.CancellationException
import java.util.concurrent.CompletableFuture
import java.util.concurrent.ExecutorService
+import java.util.concurrent.TimeUnit
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.SSLSocketFactory
import javax.net.ssl.X509TrustManager
+import kotlin.jvm.optionals.getOrNull
import okhttp3.Call
import okhttp3.Callback
+import okhttp3.ConnectionPool
import okhttp3.Dispatcher
+import okhttp3.HttpUrl
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.MediaType
import okhttp3.MediaType.Companion.toMediaType
@@ -29,17 +35,18 @@ import okhttp3.Request
import okhttp3.RequestBody
import okhttp3.RequestBody.Companion.toRequestBody
import okhttp3.Response
-import okhttp3.logging.HttpLoggingInterceptor
import okio.BufferedSink
+import okio.buffer
+import okio.sink
class OkHttpClient
-private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClient) : HttpClient {
+internal constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClient) : HttpClient {
override fun execute(request: HttpRequest, requestOptions: RequestOptions): HttpResponse {
val call = newCall(request, requestOptions)
return try {
- call.execute().toResponse()
+ call.execute().toHttpResponse()
} catch (e: IOException) {
throw M3terIoException("Request failed", e)
} finally {
@@ -57,7 +64,7 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
call.enqueue(
object : Callback {
override fun onResponse(call: Call, response: Response) {
- future.complete(response.toResponse())
+ future.complete(response.toHttpResponse())
}
override fun onFailure(call: Call, e: IOException) {
@@ -85,18 +92,6 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
private fun newCall(request: HttpRequest, requestOptions: RequestOptions): Call {
val clientBuilder = okHttpClient.newBuilder()
- val logLevel =
- when (System.getenv("M3TER_LOG")?.lowercase()) {
- "info" -> HttpLoggingInterceptor.Level.BASIC
- "debug" -> HttpLoggingInterceptor.Level.BODY
- else -> null
- }
- if (logLevel != null) {
- clientBuilder.addNetworkInterceptor(
- HttpLoggingInterceptor().setLevel(logLevel).apply { redactHeader("Authorization") }
- )
- }
-
requestOptions.timeout?.let {
clientBuilder
.connectTimeout(it.connect())
@@ -109,89 +104,6 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
return client.newCall(request.toRequest(client))
}
- private fun HttpRequest.toRequest(client: okhttp3.OkHttpClient): Request {
- var body: RequestBody? = body?.toRequestBody()
- if (body == null && requiresBody(method)) {
- body = "".toRequestBody()
- }
-
- val builder = Request.Builder().url(toUrl()).method(method.name, body)
- headers.names().forEach { name ->
- headers.values(name).forEach { builder.addHeader(name, it) }
- }
-
- if (
- !headers.names().contains("X-Stainless-Read-Timeout") && client.readTimeoutMillis != 0
- ) {
- builder.addHeader(
- "X-Stainless-Read-Timeout",
- Duration.ofMillis(client.readTimeoutMillis.toLong()).seconds.toString(),
- )
- }
- if (!headers.names().contains("X-Stainless-Timeout") && client.callTimeoutMillis != 0) {
- builder.addHeader(
- "X-Stainless-Timeout",
- Duration.ofMillis(client.callTimeoutMillis.toLong()).seconds.toString(),
- )
- }
-
- return builder.build()
- }
-
- /** `OkHttpClient` always requires a request body for some methods. */
- private fun requiresBody(method: HttpMethod): Boolean =
- when (method) {
- HttpMethod.POST,
- HttpMethod.PUT,
- HttpMethod.PATCH -> true
- else -> false
- }
-
- private fun HttpRequest.toUrl(): String {
- val builder = baseUrl.toHttpUrl().newBuilder()
- pathSegments.forEach(builder::addPathSegment)
- queryParams.keys().forEach { key ->
- queryParams.values(key).forEach { builder.addQueryParameter(key, it) }
- }
-
- return builder.toString()
- }
-
- private fun HttpRequestBody.toRequestBody(): RequestBody {
- val mediaType = contentType()?.toMediaType()
- val length = contentLength()
-
- return object : RequestBody() {
- override fun contentType(): MediaType? = mediaType
-
- override fun contentLength(): Long = length
-
- override fun isOneShot(): Boolean = !repeatable()
-
- override fun writeTo(sink: BufferedSink) = writeTo(sink.outputStream())
- }
- }
-
- private fun Response.toResponse(): HttpResponse {
- val headers = headers.toHeaders()
-
- return object : HttpResponse {
- override fun statusCode(): Int = code
-
- override fun headers(): Headers = headers
-
- override fun body(): InputStream = body!!.byteStream()
-
- override fun close() = body!!.close()
- }
- }
-
- private fun okhttp3.Headers.toHeaders(): Headers {
- val headersBuilder = Headers.builder()
- forEach { (name, value) -> headersBuilder.put(name, value) }
- return headersBuilder.build()
- }
-
companion object {
@JvmStatic fun builder() = Builder()
}
@@ -200,6 +112,9 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
private var timeout: Timeout = Timeout.default()
private var proxy: Proxy? = null
+ private var proxyAuthenticator: ProxyAuthenticator? = null
+ private var maxIdleConnections: Int? = null
+ private var keepAliveDuration: Duration? = null
private var dispatcherExecutorService: ExecutorService? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
@@ -211,6 +126,32 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
fun proxy(proxy: Proxy?) = apply { this.proxy = proxy }
+ fun proxyAuthenticator(proxyAuthenticator: ProxyAuthenticator?) = apply {
+ this.proxyAuthenticator = proxyAuthenticator
+ }
+
+ /**
+ * Sets the maximum number of idle connections kept by the underlying [ConnectionPool].
+ *
+ * If this is set, then [keepAliveDuration] must also be set.
+ *
+ * If unset, then OkHttp's default is used.
+ */
+ fun maxIdleConnections(maxIdleConnections: Int?) = apply {
+ this.maxIdleConnections = maxIdleConnections
+ }
+
+ /**
+ * Sets the keep-alive duration for idle connections in the underlying [ConnectionPool].
+ *
+ * If this is set, then [maxIdleConnections] must also be set.
+ *
+ * If unset, then OkHttp's default is used.
+ */
+ fun keepAliveDuration(keepAliveDuration: Duration?) = apply {
+ this.keepAliveDuration = keepAliveDuration
+ }
+
fun dispatcherExecutorService(dispatcherExecutorService: ExecutorService?) = apply {
this.dispatcherExecutorService = dispatcherExecutorService
}
@@ -238,8 +179,37 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
.callTimeout(timeout.request())
.proxy(proxy)
.apply {
+ proxyAuthenticator?.let { auth ->
+ proxyAuthenticator { route, response ->
+ auth
+ .authenticate(
+ route?.proxy ?: Proxy.NO_PROXY,
+ response.request.toHttpRequest(),
+ response.toHttpResponse(),
+ )
+ .getOrNull()
+ ?.toRequest(client = null)
+ }
+ }
+
dispatcherExecutorService?.let { dispatcher(Dispatcher(it)) }
+ val maxIdleConnections = maxIdleConnections
+ val keepAliveDuration = keepAliveDuration
+ if (maxIdleConnections != null && keepAliveDuration != null) {
+ connectionPool(
+ ConnectionPool(
+ maxIdleConnections,
+ keepAliveDuration.toNanos(),
+ TimeUnit.NANOSECONDS,
+ )
+ )
+ } else {
+ check((maxIdleConnections != null) == (keepAliveDuration != null)) {
+ "Both or none of `maxIdleConnections` and `keepAliveDuration` must be set, but only one was set"
+ }
+ }
+
val sslSocketFactory = sslSocketFactory
val trustManager = trustManager
if (sslSocketFactory != null && trustManager != null) {
@@ -261,3 +231,126 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
)
}
}
+
+private fun HttpRequest.toRequest(client: okhttp3.OkHttpClient?): Request {
+ var body: RequestBody? = body?.toRequestBody()
+ if (body == null && requiresBody(method)) {
+ body = "".toRequestBody()
+ }
+
+ val builder = Request.Builder().url(toUrl()).method(method.name, body)
+ headers.names().forEach { name -> headers.values(name).forEach { builder.addHeader(name, it) } }
+
+ if (client != null) {
+ if (
+ !headers.names().contains("X-Stainless-Read-Timeout") && client.readTimeoutMillis != 0
+ ) {
+ builder.addHeader(
+ "X-Stainless-Read-Timeout",
+ Duration.ofMillis(client.readTimeoutMillis.toLong()).seconds.toString(),
+ )
+ }
+ if (!headers.names().contains("X-Stainless-Timeout") && client.callTimeoutMillis != 0) {
+ builder.addHeader(
+ "X-Stainless-Timeout",
+ Duration.ofMillis(client.callTimeoutMillis.toLong()).seconds.toString(),
+ )
+ }
+ }
+
+ return builder.build()
+}
+
+/** `OkHttpClient` always requires a request body for some methods. */
+private fun requiresBody(method: HttpMethod): Boolean =
+ when (method) {
+ HttpMethod.POST,
+ HttpMethod.PUT,
+ HttpMethod.PATCH -> true
+ else -> false
+ }
+
+private fun HttpRequest.toUrl(): String {
+ val builder = baseUrl.toHttpUrl().newBuilder()
+ pathSegments.forEach(builder::addPathSegment)
+ queryParams.keys().forEach { key ->
+ queryParams.values(key).forEach { builder.addQueryParameter(key, it) }
+ }
+
+ return builder.toString()
+}
+
+private fun HttpRequestBody.toRequestBody(): RequestBody {
+ val mediaType = contentType()?.toMediaType()
+ val length = contentLength()
+
+ return object : RequestBody() {
+ override fun contentType(): MediaType? = mediaType
+
+ override fun contentLength(): Long = length
+
+ override fun isOneShot(): Boolean = !repeatable()
+
+ override fun writeTo(sink: BufferedSink) = writeTo(sink.outputStream())
+ }
+}
+
+private fun Request.toHttpRequest(): HttpRequest {
+ val builder = HttpRequest.builder().method(HttpMethod.valueOf(method)).baseUrl(url.toBaseUrl())
+ url.pathSegments.forEach(builder::addPathSegment)
+ url.queryParameterNames.forEach { name ->
+ url.queryParameterValues(name).filterNotNull().forEach { builder.putQueryParam(name, it) }
+ }
+ headers.forEach { (name, value) -> builder.putHeader(name, value) }
+ body?.let { builder.body(it.toHttpRequestBody()) }
+ return builder.build()
+}
+
+private fun HttpUrl.toBaseUrl(): String = buildString {
+ append(scheme).append("://").append(host)
+ if (port != HttpUrl.defaultPort(scheme)) {
+ append(":").append(port)
+ }
+}
+
+private fun RequestBody.toHttpRequestBody(): HttpRequestBody {
+ val mediaType = contentType()?.toString()
+ val length = contentLength()
+ val isOneShot = isOneShot()
+ val source = this
+ return object : HttpRequestBody {
+ override fun contentType(): String? = mediaType
+
+ override fun contentLength(): Long = length
+
+ override fun repeatable(): Boolean = !isOneShot
+
+ override fun writeTo(outputStream: OutputStream) {
+ val sink = outputStream.sink().buffer()
+ source.writeTo(sink)
+ sink.flush()
+ }
+
+ override fun close() {}
+ }
+}
+
+private fun Response.toHttpResponse(): HttpResponse {
+ val headers = headers.toHeaders()
+
+ return object : HttpResponse {
+ override fun statusCode(): Int = code
+
+ override fun headers(): Headers = headers
+
+ override fun body(): InputStream = body!!.byteStream()
+
+ override fun close() = body!!.close()
+ }
+}
+
+private fun okhttp3.Headers.toHeaders(): Headers {
+ val headersBuilder = Headers.builder()
+ forEach { (name, value) -> headersBuilder.put(name, value) }
+ return headersBuilder.build()
+}
diff --git a/sdk-java-core/build.gradle.kts b/sdk-java-core/build.gradle.kts
index ee0a27c2..342e4823 100644
--- a/sdk-java-core/build.gradle.kts
+++ b/sdk-java-core/build.gradle.kts
@@ -27,13 +27,11 @@ dependencies {
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.2")
- implementation("org.apache.httpcomponents.core5:httpcore5:5.2.4")
- implementation("org.apache.httpcomponents.client5:httpclient5:5.3.1")
testImplementation(kotlin("test"))
testImplementation(project(":sdk-java-client-okhttp"))
testImplementation("com.github.tomakehurst:wiremock-jre8:2.35.2")
- testImplementation("org.assertj:assertj-core:3.25.3")
+ testImplementation("org.assertj:assertj-core:3.27.7")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.3")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.9.3")
testImplementation("org.junit-pioneer:junit-pioneer:1.9.1")
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClient.kt b/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClient.kt
index 20f7e134..0f407417 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClient.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClient.kt
@@ -82,86 +82,937 @@ interface M3terClient {
*/
fun withOptions(modifier: Consumer): M3terClient
+ /**
+ * Endpoint for retrieving a JSON Web Token (JWT) bearer token for a ServiceUser using the
+ * Client Credentials Grant flow.
+ *
+ * A ServiceUser represents the automated process you want to grant access to your
+ * Organization - that is, as an API user.
+ */
fun authentication(): AuthenticationService
+ /**
+ * Endpoints for Account related operations such as creation, update, list and delete. An
+ * Account represents one of your end-customer accounts.
+ *
+ * Accounts do not belong to a Product to allow for cases where an end customer takes more than
+ * one of your Products, and the charges for these Products differ.
+ *
+ * You typically attach a priced Plan or Plan Template to an Account before you can generate
+ * bills for the Account:
+ * - If a customer consumes several of your Products, you can attach a priced Plan or Plan
+ * Template to the Account for charging against each Product.
+ * - If an Account is charged solely on the basis of an agreed Prepayment/Commitment amount but
+ * not all of the Prepayment is prepaid, you can use a customized billing schedule for
+ * outstanding fees without having to attach a Plan to the Account to generate Bills.
+ *
+ * You can create Child Accounts for end customers who hold multiple Accounts with you. You can
+ * then set up billing for the Parent/Child Account usage to have the end-customer billed once
+ * for the Parent Account, instead of having separate bills issued for usage against each of
+ * their multiple Accounts.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally Identifiable
+ * Information (PII) in m3ter is restricted to a few fields on the **Account** entity. Please
+ * ensure that only the ``name``, ``address``, or ``emailAddress`` fields contain any
+ * end-customer PII data on any Accounts you create. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for more
+ * details.
+ */
fun accounts(): AccountService
+ /**
+ * Endpoints for AccountPlan and AccountPlanGroup related operations such as creation, update,
+ * list and delete.
+ *
+ * **AccountPlans** An Account represents one of your end-customer accounts. To create an
+ * AccountPlan, you attach a Product Plan to an Account. The AccountPlan then determines the
+ * charges incurred at billing by your end customer for consuming the Product the Plan is for:
+ * * **AccountPlan Active/Inactive**. Set start and end dates to define the period the
+ * AccountPlan is active for the Account.
+ * * **AccountPlan per Product**. If an end customer consumes multiple Products, create separate
+ * AccountPlans to charge for each Product.
+ *
+ * **AccountPlan Constraints:**
+ * * Only one AccountPlan per Product can be active at any one time for an Account.
+ * * If you create a Plan as a custom Plan for a specific Account, you can only use it to create
+ * an AccountPlan for that Account.
+ *
+ * **AccountPlanGroups** Plan Groups are used when you want to apply a minimum spend amount at
+ * billing across several of your Products each of which are priced separately - when you create
+ * the Plan Group, you define an overall minimum spend and then add any priced Plans you want to
+ * include in the Group. To create an AccounPlanGroup, you can attach a Plan Group to an Account
+ * that consumes the separate Products which are priced using the included Plans. At billing,
+ * the minimum spend you've defined for the Plan Group is applied:
+ * * **Active AccountPlanGroup**. Set the start and end dates to define the period for which the
+ * Plan Group will be active for the Account.
+ *
+ * **Plan Group Notes:**
+ * * You can only add *one Plan for the same Product* to a Plan Group. See the
+ * [Plan Group](https://www.m3ter.com/docs/api#tag/PlanGroup) in this API Reference for more
+ * details on creating Plan Groups.
+ * * You can create a *custom Plan Group* for an Account, which means the Plan Group can only be
+ * attached to that Account to create an AccountPlanGroup.
+ *
+ * **AcountPlanGroup - Notes and Constraints:**
+ * * **AccountPlanGroup is type of AccountPlan** When you attach a Plan Group to an Account,
+ * this creates an AccountPlanGroup. However, the m3ter data model *does not support a
+ * separate AccountPlanGroup entity*, and an AccountPlanGroup is a type of AccountPlan where a
+ * `planGroupId` is used instead of a `planId` when it's created. See the
+ * [Create AccountPlan](https://www.m3ter.com/docs/api#tag/AccountPlan/operation/PostAccountPlan)
+ * call in this section and
+ * [Attaching Plan Groups to an Account](https://www.m3ter.com/docs/guides/end-customer-accounts/attaching-plan-groups-to-an-account)
+ * in our main User Documentation.
+ * * **Multiple AccountPlan Groups:** You can attach more than one Plan Group to an Account to
+ * create multiple AccountPlanGroups, but the rule that *only one attached Plan per Product
+ * can be active at any one time for an Account* is preserved:
+ * * Multiple attached Plan Groups on an Account can have overlapping dates only if none of
+ * the Plan Groups contain a Plan belonging to the same Product. If you try to attach a
+ * Plan Group to an Account with Plan Groups already attached and:
+ * * The new Plan Group contains a Product Plan that also belongs to a Plan Group
+ * already attached to the Account.
+ * * The dates for these "matched Plan" Plan Groups being active for the Account would
+ * overlap.
+ * * Then you'll receive an error and the attachment will be blocked.
+ */
fun accountPlans(): AccountPlanService
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Aggregations.
+ *
+ * An Aggregation links to a Meter and targets a Data Field or Derived Field on the Meter. You
+ * define the method of aggregation used to convert the usage data collected by the targeted
+ * Meter field into a numerical unit of measurement.
+ *
+ * You can then use the unit of measurement an Aggregation yields as a metric for pricing
+ * Product Plans and apply usage-based pricing to your products and services. You might also
+ * want to aggregate raw data measures for other purposes, such as to feed into analytical or
+ * business performance tools.
+ *
+ * **Notes:**
+ * * **Contrast with Compound Aggregations**. Standard or simple Aggregations of this type,
+ * which apply an aggregation method directly to Meter usage data fields, are contrasted with
+ * [Compound Aggregations](https://www.m3ter.com/docs/api#tag/CompoundAggregation). A Compound
+ * Aggregation typically references one or more simple Aggregations and applies a calculation
+ * to them to derive pricing metrics needed to serve more complex usage-based pricing
+ * scenarios.
+ * * **Segmented Aggregations**. Segmented Aggregations allow you to segment the usage data
+ * collected by a single Meter. This capability is very useful for implementing some pricing
+ * and billing use cases. See
+ * [Segmented Aggregations](https://www.m3ter.com/docs/guides/usage-data-aggregations/segmented-aggregations)
+ * in our main documentation for more details.
+ */
fun aggregations(): AggregationService
+ /**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative
+ * Transaction amounts for the Balance. To do this, you must first define Transaction Types for
+ * your Organization, and then use one of these Transaction Types when you add a specific
+ * Transaction to a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their
+ * Account, which can then be draw-down against charges due for product or service consumption.
+ * You can include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an
+ * initial free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This acts as
+ * an initial commitment, which allows them to use the service and gain an accurate insight
+ * into their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to subsequent
+ * Bills as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have
+ * agreed to pay for consuming your product or services across a full contract term. A customer
+ * might pay the entire or only part of the agreed amount upfront, but ***the commitment or
+ * prepayment amount is payable regardless of the actual usage by the customer of your service
+ * or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used when a
+ * customer wants to add a credit amount to their Account at any time during the service period
+ * or when you as service provider want to add a credit to a customer Account. This Balance
+ * credit can then be drawn-down against for billing the Account for usage, minimum spend,
+ * standing charges, or recurring charges due. Balances therefore serve payment use cases in a
+ * more flexible way, for example to be used for a "Free Credit" sign-up scheme you offer to
+ * encourage sales or to enhance customer satisfaction by adding credit to an Account to
+ * compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Commitment credit on
+ * an Account is drawn-down - Balance amounts first or Commitment/Prepayment amounts first.
+ */
fun balances(): BalanceService
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights into
+ * the consumption patterns and charges of your end-customer Accounts.
+ */
fun bills(): BillService
+ /**
+ * Endpoints for updating and retreiving the Bill Configuration for an Organization. The
+ * Organization represents your company as a direct customer of the m3ter service.
+ *
+ * You can use the **Update BillConfig** endpoint to set a global lock date for **all** Bills -
+ * any Bill with a service period end date on or before the set date will be locked and cannot
+ * be updated.
+ *
+ * **Warning: Ensure all Bills are Approved!** If you try to set a global lock date when there
+ * remains Bills in a *Pending* state whose service period end date is on or before the
+ * specified lock date, then you'll receive an error.
+ */
fun billConfig(): BillConfigService
+ /**
+ * Endpoints that manage Commitments *(also known as Prepayments)* in the context of usage-based
+ * pricing and billing. A Commitment represents an agreement where the end-customer has agreed
+ * to pay a fixed minimum amount throughout the contract period. ***The commitment amount is
+ * payable regardless of the actual usage by the customer of your service or product.***
+ *
+ * These endpoints enable the creation, updating, retrieval, and deletion of Commitments. Use
+ * them to manage your customer's Commitments and ensure optimal revenue recognition:
+ * * Specify which type of charges can draw-down against a Commitment amount on an Account at
+ * billing: usage, minimum spend, standing charges, or recurring charges.
+ * * Define overage surcharge percentages, which are applied when the usage charges exceed the
+ * agreed Commitment amount within the contract duration.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments/Prepayments are used for amounts end-customers have agreed to pay for consuming
+ * your product or services across a full contract term. A customer might pay the entire or only
+ * part of the agreed amount upfront, but ***the prepayment amount is payable regardless of the
+ * actual usage by the customer of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used when a
+ * customer wants to add a credit amount to their Account at any time during the service period
+ * or when you as service provider want to add a credit to a customer Account. This Balance
+ * credit can then be drawn-down against for billing the Account for usage, minimum spend,
+ * standing charges, or recurring charges due. Balances therefore serve payment use cases in a
+ * more flexible way, for example to be used for a "Free Credit" sign-up scheme you offer to
+ * encourage sales or to enhance customer satisfaction by adding credit to an Account to
+ * compensate for service delivery issues.
+ *
+ * You can use Prepayments/Commitments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Prepayment credit on
+ * an Account is drawn-down - Balance amounts first or Prepayment amounts first.
+ *
+ * #### Billing for Commitments
+ *
+ * If not all of an agreed Commitment amount is paid at the start of an end-customer contract
+ * period, you can choose one of two options for billing the outstanding fees due on the
+ * customer Account:
+ * - Select a Product *Plan to bill with*.
+ * - Define a *schedule of billing dates*.
+ */
fun commitments(): CommitmentService
+ /**
+ * Endpoints for creating, retrieving, listing, and cancelling Bill Jobs.
+ *
+ * Bill Jobs are critical components in billing management, providing asynchronous mechanisms to
+ * calculate and handle bills.
+ *
+ * Bill Jobs give you the flexibiity to run Bills manually for Accounts to suit different
+ * billing management purposes. For example, some historical usage data has come in for an
+ * Account and you want to run a Bill for a specific date on that Account to check that the Bill
+ * is showing correctly for the charges due on the new usage data.
+ */
fun billJobs(): BillJobService
+ /**
+ * Endpoints for creating/updating/deleting Charges.
+ *
+ * Create Charges for your end-customer Accounts to create ad-hoc line items for Account
+ * billing. Charges are:
+ * * Created for either debit or credit amounts.
+ * * Linked to a Product for accounting purposes.
+ * * Optionally linked to a Contract.
+ * * Given a specific date for billing. When a bill job has run for the specified Charge bill
+ * date, a Charge appears as an Ad-hoc line item on the Bill.
+ * * Assigned a service period.
+ * * Available in any currency defined for your Organization. See
+ * [Creating Charges for Accounts](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-charges-for-accounts)
+ * in our main user documentation for more details.
+ *
+ * Alternatively, you can create a Charge for a Balance on an end-customer Account to create
+ * balance fee line items for Account billing. See
+ * [Creating Charges for Balances](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-balances-for-accounts/creating-charges-for-balances)
+ * in our main user documentation for more details.
+ */
fun charges(): ChargeService
+ /**
+ * Endpoints for Compound Aggregation related operations such as creation, update, list and
+ * delete.
+ *
+ * Use Compound Aggregations to create numerical measures from usage data by applying a
+ * calculation to one or more simple Aggregations or Custom Fields. These numerical measures can
+ * then be used as pricing metrics to price your Product Plans, enabling you to implement a wide
+ * range of usage-based pricing use cases.
+ *
+ * You can create two types of Compound Aggregation:
+ *
+ * **Global**
+ * - Pricing: Not tied to any specific product and can be used to price Plans belonging to any
+ * Product.
+ * - Calculation: can reference all simple Aggregations - both Global simple Aggregations and
+ * any product-specific simple Aggregations.
+ *
+ * **Product-specific**
+ * - Pricing: belong to a specific Product and can only be used to price Plans belonging to the
+ * same Product.
+ * - Calculation: can reference any simple Aggregations belonging to the same Product and any
+ * Global simple Aggregations.
+ *
+ * **IMPORTANT!** If a simple Aggregation referenced by a Compound Aggregation has a **Quantity
+ * per unit** defined or a **Rounding** defined, these will not be factored into the value used
+ * by the calculation. For example, if the simple Aggregation referenced has a base value of 100
+ * and has **Quantity per unit** set at 10, the Compound Aggregation calculation *will use the
+ * base value of 100 not 10*.
+ *
+ * To better understand and use Compound Aggregations, refer to the example
+ * [Compound Aggregation Use Case](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/compound-aggregations#example-use-case)
+ * in the m3ter documentation.
+ */
fun compoundAggregations(): CompoundAggregationService
+ /**
+ * Endpoints for Contract related operations such as creation, update, list and delete.
+ *
+ * Contracts are created for Accounts, which are your end-user customers. Contracts can be used
+ * for:
+ * * **Accounts Reporting**. To serve your general accounting operations and processes, you can
+ * report on total Contract values for an Account.
+ * * **Contract Billing**. Various billing entities associated with an Account can be linked to
+ * Contracts on the Account to meet your specific Contract billing use cases.
+ */
fun contracts(): ContractService
+ /**
+ * Endpoints for listing, creating, retrieving, updating, or deleting Counters.
+ *
+ * You can create Counters for your m3ter Organization, which can then be used as pricing
+ * metrics to apply a unit-based
+ * [CounterPricing](https://www.m3ter.com/docs/api#tag/CounterPricing) to Product Plans or Plan
+ * Templates for recurring subscription charges on Accounts.
+ *
+ * Counters can then be used to post
+ * [CounterAdjustments](https://www.m3ter.com/docs/api#tag/CounterAdjustments) on your
+ * end-customer Accounts.
+ *
+ * Accounts are then billed in accordance with the CounterPricing on Plans attached to the
+ * Accounts and for the actual Counter quantities Accounts subscribe to. See
+ * [Recurring Charges: Counters](https://www.m3ter.com/docs/guides/recurring-charges-counters)
+ * in our main user documentation for more details.
+ */
fun counters(): CounterService
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterAdjustments.
+ *
+ * If you attach a Plan to an Account which is priced using a Counter to apply unit-based
+ * pricing, you can then create CounterAdjustments for the Account using that Counter to ensure
+ * the Account is billed according to the number of Counter units the Account subscribes to in a
+ * given billing period.
+ *
+ * See
+ * [Understanding and Creating Counter Adjustments for Accounts](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counter-adjustments-for-accounts)
+ * for more information.
+ */
fun counterAdjustments(): CounterAdjustmentService
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterPricing.
+ *
+ * Create the CounterPricing for a Plan/PlanTemplate using a Counter, and define a unit-based
+ * pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Creating Counters and Pricing Plans](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counters)
+ * for more information.
+ */
fun counterPricings(): CounterPricingService
+ /**
+ * Endpoints for CreditReason operations such as creation, update, list, and delete.
+ *
+ * You can create CreditReasons for your Organization, and then use them when creating a credit
+ * line item on a bill, or applying a product credit to a bill. CreditReasons provide contextual
+ * information as to why a credit was applied.
+ */
fun creditReasons(): CreditReasonService
+ /**
+ * Endpoints for Currency operations such as creation, update, list, and delete. Currencies are
+ * stored for your Organization, and can then be used to specify currencies on various entities
+ * such as plan groups and plan templates.
+ *
+ * **IMPORTANT!** The Currencies you want to use in your Organization must be created first.
+ *
+ * The currency you select for your Organization determines the billing currency and overrides
+ * any currency settings in your pricing Plans. For example, if the Organization currency is set
+ * to USD and a pricing Plan used for an Account is set to GBP, the bill for an Account using
+ * that Plan is calculated in GBP, and then each bill line item converted to USD amounts.
+ *
+ * Currency conversion rates are setup in the *OrganizationConfig*. For more details, see
+ * [Creating and Managing Currencies](https://www.m3ter.com/docs/guides/organization-and-access-management/viewing-and-editing-organization#creating-and-managing-currencies)
+ * in the m3ter Documentation.
+ */
fun currencies(): CurrencyService
+ /**
+ * Endpoints for retrieving and updating Custom Fields at the Organization level for all
+ * entities that support them.
+ *
+ * Custom Fields in m3ter allow you to store custom data in the form of number or string values
+ * against m3ter entities in a way that does not directly affect the normal working operation of
+ * the m3ter platform. Having this capability to store data in a free-hand fashion can prove
+ * very useful in helping you to meet specific usage-based pricing and other operational
+ * business use cases.
+ *
+ * However, you can exploit the values stored on Custom Fields in a more direct way by
+ * referencing them in Derived Field and Compound Aggregation calculations. Given the key role
+ * these calculations can play when implementing usage-based pricing schema, any Custom Fields
+ * you reference will then affect how the platform behaves. Referencing Custom Field values in
+ * your calculations offers a much wider scope of options when it comes to resolving complex
+ * usage-based pricing use cases.
+ *
+ * Custom Fields can be added to the following entities at Organizational level:
+ * * Organization
+ * * Account
+ * * AccountPlan
+ * * Aggregation
+ * * Compound Aggregation
+ * * Meter
+ * * Product
+ * * Plan
+ * * PlanTemplate
+ * * Contract
+ *
+ * These all follow the same pattern - a new *(optional)* field is available on the entity
+ * request and response bodies called "customFields" which is a object in this format:
+ * ```
+ * "customFields": {
+ * "exampleCustomField1": 7.1,
+ * "exampleCustomField2": "stringValue"
+ * }
+ * ```
+ *
+ * The value for a Custom Field can be a string or a number.
+ *
+ * **Using Custom Field values in calculations:**
+ * - You can add Custom Fields at two levels - the Organization level and the individual entity
+ * level.
+ * - The Organizational level field provides a default value and *must be added* if you want to
+ * also add a Custom Field of the same name at the corresponding individual entity level. If
+ * you reference the Custom Field in a calculation, the value for the individual entity level
+ * field is used. If no field is defined at individual entity level, then the Organization
+ * level field value is used.
+ *
+ * **Important: Constraints and Exceptions!**
+ *
+ * **Custom Fields at Organization Level**. Currently, you cannot create Custom Fields at the
+ * Organization-level for the following enitites:
+ * * Plan Group
+ * * Balance
+ * * Balance Transaction Schedule
+ * * Balance Charge Schedule
+ *
+ * Therefore you cannot reference the Custom Fields values created at the individual entity
+ * level for these entities in your Derived Field or Compound Aggregation calculations.
+ *
+ * **Derived Field Calculations**. You can *only reference Custom Fields* for the following
+ * entities:
+ * * Organization
+ * * Meter
+ * * Account
+ *
+ * However, if you are using Meters belonging to *a specific Product*, that is, not *Global
+ * Meters*, you can also reference Custom Fields added to a Product in Derived Field
+ * calculations.
+ *
+ * **Compound Aggregation Calculations - Meter Custom Fields**. The value of the *Organization
+ * level Meter Custom Field will always be used*, even if you have defined a corresponding field
+ * at the individual Meter level.
+ *
+ * See
+ * [Working with Custom Fields](https://www.m3ter.com/docs/guides/creating-and-managing-products/working-with-custom-fields)
+ * in the m3ter documentation for more information.
+ */
fun customFields(): CustomFieldService
+ /**
+ * Endpoints for triggering one-off, ad-hoc Data Exports. You can set up and run ad-hoc Exports
+ * to export two kinds of data from your m3ter Organization:
+ * * Usage data.
+ * * Operational data for entities.
+ *
+ * **Ad-Hoc Export Destinations** When setting up and running an ad-hoc Export:
+ * * You can define one or more Export Destinations - see the
+ * [ExportDestination](https://www.m3ter.com/docs/api#tag/ExportDestination) section of this
+ * API Reference. When the export runs, the data is sent through to the sepecified
+ * Destination. However, the export file is also made available for you to download it
+ * locally.
+ * * You can set up and run Data Exports without defining a Destination. The data is not
+ * exported but the compiled export file is made available for downloading locally.
+ * * For details on downloading an export file, see the
+ * [Get Data Export File Download URL](https://www.m3ter.com/docs/api#tag/ExportDestination/operation/GenerateDataExportFileDownloadUrl)
+ * endpoint in this API Reference.
+ *
+ * **Preview Version!** The Data Export feature is currently available only in Preview release
+ * version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Preview release definition. ExportAdHoc endpoints will only be available if Data Export
+ * has been enabled for your Organization. For more details see
+ * [Data Export(Preview)](https://www.m3ter.com/docs/guides/data-exports) in our main User
+ * documentation. If you're interested in previewing the Data Export feature, please get in
+ * touch with m3ter Support or your m3ter contact.
+ */
fun dataExports(): DataExportService
+ /**
+ * Endpoints for DebitReason operations such as creation, update, list, and delete.
+ *
+ * You can create DebitReasons for your Organization, and then use them when creating a debit
+ * line item on a bill, or applying a product debit to a bill. DebitReasons provide contextual
+ * information as to why a debit was applied.
+ */
fun debitReasons(): DebitReasonService
+ /**
+ * This section provides Endpoints for operations that allow you to retrieve detailed
+ * information about individual Events, list all Events or specific Event Types, and explore
+ * dynamic fields available for each Event Type.
+ *
+ * Events encompass specific instances of state changes within the system, such as the creation
+ * of a new Prepayment/Commitment for an Account. Each Event is classified under an Event Type
+ * framework, providing context about what kind of change occurred to generate the Event.
+ *
+ * **Events for Configuration and Billing Entities**
+ *
+ * Many Event Types cover common configuration and billing objects, where the Event is generated
+ * for a state change of one of these objects - for when the configuration or billing object is
+ * **created**, **deleted**, or **updated**.
+ *
+ * For example:
+ * * configuration.commitment.created
+ * * configuration.commitment.deleted
+ * * configuration.commitment.updated
+ * * configuration.account.created
+ * * configuration.account.deleted
+ * * configuration.account.updated
+ * * billing.bill.created
+ * * billing.bill.deleted
+ * * billing.bill.created
+ *
+ * **Events for Errors or Failures**
+ *
+ * There are also Event Types for certain kinds of error that can occur:
+ * * For an Integration:
+ * * validation
+ * * authentication
+ * * perform
+ * * missing account mapping
+ * * disabled
+ * * For a Usage Data Ingest Submission:
+ * * validation failure
+ * * For Data Export Jobs:
+ * * data export job failure
+ *
+ * **Scheduled Events**
+ *
+ * In addition to system-generated Events that occur when a configuration entity undergoes a
+ * state change at creation, update, or deletion of the entity, you can use API calls to create
+ * and configure *Scheduled Event Configurations*. Scheduled Events are custom Event types,
+ * which you can set up by referencing Date/Time fields on configuration and billing entities.
+ * See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference for more details.
+ *
+ * **Notifications for Events**
+ *
+ * You can create Notification rules based on Events and these rules can reference and apply
+ * calculations to the Event's fields. This allows you to set up customized alerts to be sent
+ * out via webhooks when the Event occurs and any conditions you've built into the Notification
+ * rule's calculation are satisfied.
+ *
+ * See the [Notifications](https://www.m3ter.com/docs/api#tag/Notifications) section for more
+ * details.
+ *
+ * **Other Events**
+ *
+ * When Events occur, they can cause other Events, such as when a Notification is triggered by
+ * the Event it is based on. For these Events there are currently two categories:
+ * * Notification
+ * * IntegrationEvent
+ *
+ * Also see
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * and
+ * [Object Definitions and API Calls](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications/object-definitions-and-api-calls)
+ * in the m3ter documentation for more guidance.
+ */
fun events(): EventService
+ /**
+ * Endpoints for managing External Mapping related operations such as creation, update, list and
+ * delete.
+ *
+ * When you integrate your 3rd-party systems with the m3ter platform, a mapping between entities
+ * in the local system *(m3ter)* and external systems is constructed. This *External Mapping* is
+ * crucial in scenarios where data from external systems is consumed or where data from the
+ * local system is to be synchronized with external systems.
+ *
+ * When you are working to set up your Integrations and want to test or troubleshoot your
+ * implementation before going live, you might need to create External Mappings manually and, at
+ * a later date, edit or delete them.
+ */
fun externalMappings(): ExternalMappingService
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the m3ter
+ * platform. The integration endpoints in this section facilitate various operations such as
+ * creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing, billing
+ * and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
fun integrationConfigurations(): IntegrationConfigurationService
+ /**
+ * Endpoints for creating/updating/deleting Lookup Tables.
+ *
+ * Lookup Tables enable you to manage dynamic data mappings that your calculations reference.
+ * Use them for currency conversion, pricing tiers, discount rates, and similar scenarios where
+ * you require values to change operationally but for calculation logic to remain constant.
+ *
+ * **Beta Version!** The Lookup Table feature is currently available in Beta release version.
+ * See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition. Lookup Table endpoints will only be available if Lookup Tables
+ * have been enabled for your Organization. For more details see
+ * [Lookup Tables (Beta)](https://www.m3ter.com/docs/guides/lookup-tables) in our main User
+ * documentation.
+ */
fun lookupTables(): LookupTableService
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Meters.
+ *
+ * Use Meters to submit usage data for the consumption of your products and services by end
+ * customers. This usage data then becomes the basis for setting up usage-based pricing for your
+ * products and services.
+ *
+ * Examples of usage data collected in Meters:
+ * * Number of logins.
+ * * Duration of session.
+ * * Amount of data downloaded.
+ *
+ * To collect usage data and ingest it into the platform, you can define two types of fields for
+ * Meters:
+ * - `dataFields` Used to collect raw usage data measures - numeric quantitative data values or
+ * non-numeric point data values.
+ * - `derivedFields` Used to derive usage data measures that are the result of applying a
+ * calculation to `dataFields`, `customFields`, or system `Timestamp` fields.
+ *
+ * You can also:
+ * - Create `customFields` for a Meter, which allows you to attach custom data to the Meter as
+ * name/value pairs.
+ * - Create Global Meters, which are not tied to a specific Product and allow you to collect
+ * usage data that will form the basis of usage-based pricing across multiple Products.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally Identifiable
+ * Information (PII) in m3ter is restricted to a few fields on the **Account** entity. Please
+ * ensure that any fields you configure for Meters, such as Data Fields or Derived Fields, do
+ * not contain any end-customer PII data. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for more
+ * details.
+ *
+ * See also:
+ * - [Reviewing Meter
+ * Options](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/reviewing-meter-options).
+ */
fun meters(): MeterService
+ /**
+ * This section provides endpoints for managing Event Notifications.
+ *
+ * You can create Notifications based on system Events generated by the platform. When you base
+ * a Notification on a specific Event type, you can include a calculation that references the
+ * fields available on that Event type to define precise conditions that must be met for the
+ * Notification to be triggered when an Event of that type occurs. In this way, you can set up
+ * highly customized Notifications that act as timely alerts to inform you about significant
+ * occurrences within your Organization. For instance, if you provide a sign-up bonus to new
+ * end-customer Accounts, you can set up a Notification to alert you when an end-customer
+ * Account has used up a certain percentage of their bonus credit.
+ *
+ * You can also set up Notifications based on Scheduled Event types you've created for your
+ * Organization. See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference and
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our user documentation.
+ *
+ * For more details on Event types and their fields, see the
+ * [Events](https://www.m3ter.com/docs/api#tag/Events) section.
+ *
+ * For detailed guidance on working with Events and Notifications, refer to the
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * section of the m3ter user documentation.
+ */
fun notificationConfigurations(): NotificationConfigurationService
+ /**
+ * Endpoints for retrieving or updating the Organization Config.
+ *
+ * Organization represents your company as a direct customer of m3ter. Use Organization
+ * configuration to define *Organization-wide* settings. For example:
+ * - Timezone.
+ * - Currencies and currency conversions.
+ * - Billing operations settings, such as:
+ * - Epoch dates to control first billing dates.
+ * - Whether to bill customer accounts in advance/in arrears for standing charge amounts,
+ * minimum spend amounts, and commitment fees.
+ *
+ * For other aspects of your Organization setup and configuration, see the following sections in
+ * this API Reference:
+ * * [Custom Fields](https://www.m3ter.com/docs/api#tag/CustomField)
+ * * [Currencies](https://www.m3ter.com/docs/api#tag/Currency)
+ * * [Credit Reasons](https://www.m3ter.com/docs/api#tag/CreditReason)
+ * * [Debit Reason](https://www.m3ter.com/docs/api#tag/DebitReason)
+ * * [Transaction Types](https://www.m3ter.com/docs/api#tag/TransactionType)
+ *
+ * See also:
+ * - [Managing your
+ * Organization](https://www.m3ter.com/docs/guides/managing-organization-and-users/viewing-and-editing-organization).
+ */
fun organizationConfig(): OrganizationConfigService
+ /**
+ * Endpoints for Permission Policy related operations such as creation, update, add and
+ * retrieve.
+ *
+ * Permission Policies can restrict or grant access to specific resources for both Users
+ * *(people)* and Service Users *(automated processes with direct API access)*. This enables you
+ * to control precisely what a User can do in your m3ter Organization.
+ *
+ * For more details, see
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/organization-and-access-management/creating-and-managing-permissions#permission-policy-statements---available-actions-and-resources)
+ * in our main Documentation.
+ */
fun permissionPolicies(): PermissionPolicyService
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Plans.
+ *
+ * A Plan is based on a PlanTemplate and represents a specific pricing plan for one of your
+ * products or services. Each Plan inherits general billing attributes or pricing structure from
+ * its parent Plan Template. Some attributes can be overriden for the specific Plan.
+ *
+ * When you've created the Plan Templates and Plans you need for your Products, you can
+ * configure the exact pricing structures for Plans to charge customers that consume one or more
+ * of your Products.
+ *
+ * You can then attach the appropriately priced Plans to customer Accounts to create
+ * [Account Plans](https://www.m3ter.com/docs/api#tag/AccountPlan) and enable charges to be
+ * calculated correctly for billing against those Accounts.
+ *
+ * See also:
+ * - [Reviewing Options for Plans and Plan
+ * Templates](https://www.m3ter.com/docs/guides/working-with-plan-templates-and-plans/reviewing-configuration-options-for-plans-and-plan-templates).
+ */
fun plans(): PlanService
+ /**
+ * Endpoints for PlanGroup related operations such as creation, update, retrieve, list and
+ * delete.
+ *
+ * PlanGroups are constructs that group multiple plans together. This enables a unified approach
+ * to efficiently handle various uses cases across different plans. For example applying a
+ * minimum spend amount at billing, across several of your products or features that are each
+ * priced separately.
+ */
fun planGroups(): PlanGroupService
+ /**
+ * Endpoints for PlanGroupLink related operations such as creation, update, list and delete.
+ *
+ * PlanGroupLinks are the intersection table between a PlanGroup and its associated Plans. A
+ * PlanGroupLink is only created when at least 1 Plan is linked to a PlanGroup.
+ */
fun planGroupLinks(): PlanGroupLinkService
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting PlanTemplates.
+ *
+ * Use PlanTemplates to define default values for Plans. These default values control the
+ * billing operations you want applied to your products. PlanTemplates avoid repetition in
+ * configuration work - many Plans will share settings for billing operations and differ only in
+ * the details of their pricing structures.
+ *
+ * A PlanTemplate is linked to a Product, and each Plan is a child of a PlanTemplate.
+ */
fun planTemplates(): PlanTemplateService
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Pricing.
+ *
+ * Create the Pricing for a Plan/PlanTemplate with usage data Aggregations, and define a
+ * usage-based pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Reviewing Pricing Options for Plans and Plan Templates](https://www.m3ter.com/docs/guides/pricing-plans/reviewing-pricing-options-and-pricing-plans)
+ * for more information.
+ */
fun pricings(): PricingService
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Products.
+ *
+ * A Product represents the products and services you offer to your end customers. Products act
+ * as a container for the Meters, Aggregations, Pricing, and Plans required to implement
+ * usage-based and other pricing models for your Organization.
+ */
fun products(): ProductService
+ /**
+ * Endpoints for ResourceGroup related operations such as creation, update, list and delete.
+ *
+ * ResourceGroups are used in the context of Permission Policies, which controls what a User who
+ * has been given access to your Organization can and cannot do. For example, you might want to
+ * create a Permissions Policy that denies Users the ability to retrieve Meters.
+ *
+ * Resources are defined as m3ter Resource Identifiers *(MRIs)* in the format:
+ * ```
+ * service:resource-type/item-type/id
+ * ```
+ *
+ * Where:
+ * * service is a distinct part of the overall m3ter system, and which forms a natural
+ * functional grouping, such as "config" or "billing".
+ * * resource-type is the resource type item accessed - for example: "Plan", "Meter", "Bill"
+ * * item-type is one of:
+ * * "item" - to specify an individual item.
+ * * "group" - to specify a resource group.
+ * * id is the resource group id or the resource item id
+ *
+ * Resources can be assigned to one or more ResourceGroups. For example, a Plan can be assigned
+ * to Plan ResourceGroups, a Meter can be assigned to Meter ResourceGroups, and so on. This is
+ * useful for cases where you want to create Permission Policies which allow or deny access to a
+ * specific subset of resources. For example, grant a user access to only some of the Plans in
+ * your Organization.
+ *
+ * This concept of grouping resources applies to every resource in m3ter, including
+ * ResourceGroups themselves. This allows you to nest ResourceGroups to support hierarchies of
+ * groups.
+ *
+ * See
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/managing-organization-and-users/creating-and-managing-permissions)
+ * in the m3ter documentation for more information.
+ *
+ * **Note: User Resource Groups** You can create a User Resource Group to group resources of
+ * type = `user`. You can then retrieve a list of the User Resource Groups a user belongs to.
+ * For more details, see the
+ * [Retrieve OrgUser Groups](https://www.m3ter.com/docs/api#tag/OrgUsers/operation/GetOrgUserGroups)
+ * call in the OrgUsers section.
+ */
fun resourceGroups(): ResourceGroupService
+ /**
+ * Endpoints for retrieving and managing scheduled Events' configurations.
+ *
+ * Scheduled Event Configurations define custom Event types that reference Date/Time fields
+ * belonging to configuration and billing entities. They therefore provide you with an extra
+ * degree of flexibility over and above system-generated Events for setting up Notifications
+ * based on Events.
+ *
+ * For more details, see the
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our Documenation.
+ */
fun scheduledEventConfigurations(): ScheduledEventConfigurationService
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights into
+ * the consumption patterns and charges of your end-customer Accounts.
+ */
fun statements(): StatementService
+ /**
+ * Endpoints for TransactionType operations such as creation, update, list, retrieve, and
+ * delete.
+ *
+ * You can create TransactionTypes for your Organization, which can then be used when creating
+ * and updating Balances. Example TransactionTypes: "Balance Amount" or "Add Funds".
+ *
+ * For details on creating a Transaction amount for a Balance using a TransactionType you've
+ * created for your Organization, see the
+ * [Create Balance Transaction](https://www.m3ter.com/docs/api#tag/Balances/operation/PostBalanceTransaction)
+ * call in the [Balances](https://www.m3ter.com/docs/api#tag/Balances) section of this API
+ * Reference.
+ */
fun transactionTypes(): TransactionTypeService
fun usage(): UsageService
fun users(): UserService
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the m3ter
+ * platform. The integration endpoints in this section facilitate various operations such as
+ * creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing, billing
+ * and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
fun webhooks(): WebhookService
/**
@@ -187,86 +1038,945 @@ interface M3terClient {
*/
fun withOptions(modifier: Consumer): M3terClient.WithRawResponse
+ /**
+ * Endpoint for retrieving a JSON Web Token (JWT) bearer token for a ServiceUser using the
+ * Client Credentials Grant flow.
+ *
+ * A ServiceUser represents the automated process you want to grant access to your
+ * Organization - that is, as an API user.
+ */
fun authentication(): AuthenticationService.WithRawResponse
+ /**
+ * Endpoints for Account related operations such as creation, update, list and delete. An
+ * Account represents one of your end-customer accounts.
+ *
+ * Accounts do not belong to a Product to allow for cases where an end customer takes more
+ * than one of your Products, and the charges for these Products differ.
+ *
+ * You typically attach a priced Plan or Plan Template to an Account before you can generate
+ * bills for the Account:
+ * - If a customer consumes several of your Products, you can attach a priced Plan or Plan
+ * Template to the Account for charging against each Product.
+ * - If an Account is charged solely on the basis of an agreed Prepayment/Commitment amount
+ * but not all of the Prepayment is prepaid, you can use a customized billing schedule for
+ * outstanding fees without having to attach a Plan to the Account to generate Bills.
+ *
+ * You can create Child Accounts for end customers who hold multiple Accounts with you. You
+ * can then set up billing for the Parent/Child Account usage to have the end-customer
+ * billed once for the Parent Account, instead of having separate bills issued for usage
+ * against each of their multiple Accounts.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally
+ * Identifiable Information (PII) in m3ter is restricted to a few fields on the **Account**
+ * entity. Please ensure that only the ``name``, ``address``, or ``emailAddress`` fields
+ * contain any end-customer PII data on any Accounts you create. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for
+ * more details.
+ */
fun accounts(): AccountService.WithRawResponse
+ /**
+ * Endpoints for AccountPlan and AccountPlanGroup related operations such as creation,
+ * update, list and delete.
+ *
+ * **AccountPlans** An Account represents one of your end-customer accounts. To create an
+ * AccountPlan, you attach a Product Plan to an Account. The AccountPlan then determines the
+ * charges incurred at billing by your end customer for consuming the Product the Plan is
+ * for:
+ * * **AccountPlan Active/Inactive**. Set start and end dates to define the period the
+ * AccountPlan is active for the Account.
+ * * **AccountPlan per Product**. If an end customer consumes multiple Products, create
+ * separate AccountPlans to charge for each Product.
+ *
+ * **AccountPlan Constraints:**
+ * * Only one AccountPlan per Product can be active at any one time for an Account.
+ * * If you create a Plan as a custom Plan for a specific Account, you can only use it to
+ * create an AccountPlan for that Account.
+ *
+ * **AccountPlanGroups** Plan Groups are used when you want to apply a minimum spend amount
+ * at billing across several of your Products each of which are priced separately - when you
+ * create the Plan Group, you define an overall minimum spend and then add any priced Plans
+ * you want to include in the Group. To create an AccounPlanGroup, you can attach a Plan
+ * Group to an Account that consumes the separate Products which are priced using the
+ * included Plans. At billing, the minimum spend you've defined for the Plan Group is
+ * applied:
+ * * **Active AccountPlanGroup**. Set the start and end dates to define the period for which
+ * the Plan Group will be active for the Account.
+ *
+ * **Plan Group Notes:**
+ * * You can only add *one Plan for the same Product* to a Plan Group. See the
+ * [Plan Group](https://www.m3ter.com/docs/api#tag/PlanGroup) in this API Reference for
+ * more details on creating Plan Groups.
+ * * You can create a *custom Plan Group* for an Account, which means the Plan Group can
+ * only be attached to that Account to create an AccountPlanGroup.
+ *
+ * **AcountPlanGroup - Notes and Constraints:**
+ * * **AccountPlanGroup is type of AccountPlan** When you attach a Plan Group to an Account,
+ * this creates an AccountPlanGroup. However, the m3ter data model *does not support a
+ * separate AccountPlanGroup entity*, and an AccountPlanGroup is a type of AccountPlan
+ * where a `planGroupId` is used instead of a `planId` when it's created. See the
+ * [Create AccountPlan](https://www.m3ter.com/docs/api#tag/AccountPlan/operation/PostAccountPlan)
+ * call in this section and
+ * [Attaching Plan Groups to an Account](https://www.m3ter.com/docs/guides/end-customer-accounts/attaching-plan-groups-to-an-account)
+ * in our main User Documentation.
+ * * **Multiple AccountPlan Groups:** You can attach more than one Plan Group to an Account
+ * to create multiple AccountPlanGroups, but the rule that *only one attached Plan per
+ * Product can be active at any one time for an Account* is preserved:
+ * * Multiple attached Plan Groups on an Account can have overlapping dates only if none
+ * of the Plan Groups contain a Plan belonging to the same Product. If you try to
+ * attach a Plan Group to an Account with Plan Groups already attached and:
+ * * The new Plan Group contains a Product Plan that also belongs to a Plan Group
+ * already attached to the Account.
+ * * The dates for these "matched Plan" Plan Groups being active for the Account
+ * would overlap.
+ * * Then you'll receive an error and the attachment will be blocked.
+ */
fun accountPlans(): AccountPlanService.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Aggregations.
+ *
+ * An Aggregation links to a Meter and targets a Data Field or Derived Field on the Meter.
+ * You define the method of aggregation used to convert the usage data collected by the
+ * targeted Meter field into a numerical unit of measurement.
+ *
+ * You can then use the unit of measurement an Aggregation yields as a metric for pricing
+ * Product Plans and apply usage-based pricing to your products and services. You might also
+ * want to aggregate raw data measures for other purposes, such as to feed into analytical
+ * or business performance tools.
+ *
+ * **Notes:**
+ * * **Contrast with Compound Aggregations**. Standard or simple Aggregations of this type,
+ * which apply an aggregation method directly to Meter usage data fields, are contrasted
+ * with [Compound Aggregations](https://www.m3ter.com/docs/api#tag/CompoundAggregation). A
+ * Compound Aggregation typically references one or more simple Aggregations and applies a
+ * calculation to them to derive pricing metrics needed to serve more complex usage-based
+ * pricing scenarios.
+ * * **Segmented Aggregations**. Segmented Aggregations allow you to segment the usage data
+ * collected by a single Meter. This capability is very useful for implementing some
+ * pricing and billing use cases. See
+ * [Segmented Aggregations](https://www.m3ter.com/docs/guides/usage-data-aggregations/segmented-aggregations)
+ * in our main documentation for more details.
+ */
fun aggregations(): AggregationService.WithRawResponse
+ /**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative
+ * Transaction amounts for the Balance. To do this, you must first define Transaction Types
+ * for your Organization, and then use one of these Transaction Types when you add a
+ * specific Transaction to a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their
+ * Account, which can then be draw-down against charges due for product or service
+ * consumption. You can include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an
+ * initial free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This
+ * acts as an initial commitment, which allows them to use the service and gain an
+ * accurate insight into their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to
+ * subsequent Bills as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have
+ * agreed to pay for consuming your product or services across a full contract term. A
+ * customer might pay the entire or only part of the agreed amount upfront, but ***the
+ * commitment or prepayment amount is payable regardless of the actual usage by the customer
+ * of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used
+ * when a customer wants to add a credit amount to their Account at any time during the
+ * service period or when you as service provider want to add a credit to a customer
+ * Account. This Balance credit can then be drawn-down against for billing the Account for
+ * usage, minimum spend, standing charges, or recurring charges due. Balances therefore
+ * serve payment use cases in a more flexible way, for example to be used for a "Free
+ * Credit" sign-up scheme you offer to encourage sales or to enhance customer satisfaction
+ * by adding credit to an Account to compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Commitment credit
+ * on an Account is drawn-down - Balance amounts first or Commitment/Prepayment amounts
+ * first.
+ */
fun balances(): BalanceService.WithRawResponse
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights
+ * into the consumption patterns and charges of your end-customer Accounts.
+ */
fun bills(): BillService.WithRawResponse
+ /**
+ * Endpoints for updating and retreiving the Bill Configuration for an Organization. The
+ * Organization represents your company as a direct customer of the m3ter service.
+ *
+ * You can use the **Update BillConfig** endpoint to set a global lock date for **all**
+ * Bills - any Bill with a service period end date on or before the set date will be locked
+ * and cannot be updated.
+ *
+ * **Warning: Ensure all Bills are Approved!** If you try to set a global lock date when
+ * there remains Bills in a *Pending* state whose service period end date is on or before
+ * the specified lock date, then you'll receive an error.
+ */
fun billConfig(): BillConfigService.WithRawResponse
+ /**
+ * Endpoints that manage Commitments *(also known as Prepayments)* in the context of
+ * usage-based pricing and billing. A Commitment represents an agreement where the
+ * end-customer has agreed to pay a fixed minimum amount throughout the contract period.
+ * ***The commitment amount is payable regardless of the actual usage by the customer of
+ * your service or product.***
+ *
+ * These endpoints enable the creation, updating, retrieval, and deletion of Commitments.
+ * Use them to manage your customer's Commitments and ensure optimal revenue recognition:
+ * * Specify which type of charges can draw-down against a Commitment amount on an Account
+ * at billing: usage, minimum spend, standing charges, or recurring charges.
+ * * Define overage surcharge percentages, which are applied when the usage charges exceed
+ * the agreed Commitment amount within the contract duration.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments/Prepayments are used for amounts end-customers have agreed to pay for
+ * consuming your product or services across a full contract term. A customer might pay the
+ * entire or only part of the agreed amount upfront, but ***the prepayment amount is payable
+ * regardless of the actual usage by the customer of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used
+ * when a customer wants to add a credit amount to their Account at any time during the
+ * service period or when you as service provider want to add a credit to a customer
+ * Account. This Balance credit can then be drawn-down against for billing the Account for
+ * usage, minimum spend, standing charges, or recurring charges due. Balances therefore
+ * serve payment use cases in a more flexible way, for example to be used for a "Free
+ * Credit" sign-up scheme you offer to encourage sales or to enhance customer satisfaction
+ * by adding credit to an Account to compensate for service delivery issues.
+ *
+ * You can use Prepayments/Commitments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Prepayment credit
+ * on an Account is drawn-down - Balance amounts first or Prepayment amounts first.
+ *
+ * #### Billing for Commitments
+ *
+ * If not all of an agreed Commitment amount is paid at the start of an end-customer
+ * contract period, you can choose one of two options for billing the outstanding fees due
+ * on the customer Account:
+ * - Select a Product *Plan to bill with*.
+ * - Define a *schedule of billing dates*.
+ */
fun commitments(): CommitmentService.WithRawResponse
+ /**
+ * Endpoints for creating, retrieving, listing, and cancelling Bill Jobs.
+ *
+ * Bill Jobs are critical components in billing management, providing asynchronous
+ * mechanisms to calculate and handle bills.
+ *
+ * Bill Jobs give you the flexibiity to run Bills manually for Accounts to suit different
+ * billing management purposes. For example, some historical usage data has come in for an
+ * Account and you want to run a Bill for a specific date on that Account to check that the
+ * Bill is showing correctly for the charges due on the new usage data.
+ */
fun billJobs(): BillJobService.WithRawResponse
+ /**
+ * Endpoints for creating/updating/deleting Charges.
+ *
+ * Create Charges for your end-customer Accounts to create ad-hoc line items for Account
+ * billing. Charges are:
+ * * Created for either debit or credit amounts.
+ * * Linked to a Product for accounting purposes.
+ * * Optionally linked to a Contract.
+ * * Given a specific date for billing. When a bill job has run for the specified Charge
+ * bill date, a Charge appears as an Ad-hoc line item on the Bill.
+ * * Assigned a service period.
+ * * Available in any currency defined for your Organization. See
+ * [Creating Charges for Accounts](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-charges-for-accounts)
+ * in our main user documentation for more details.
+ *
+ * Alternatively, you can create a Charge for a Balance on an end-customer Account to create
+ * balance fee line items for Account billing. See
+ * [Creating Charges for Balances](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-balances-for-accounts/creating-charges-for-balances)
+ * in our main user documentation for more details.
+ */
fun charges(): ChargeService.WithRawResponse
+ /**
+ * Endpoints for Compound Aggregation related operations such as creation, update, list and
+ * delete.
+ *
+ * Use Compound Aggregations to create numerical measures from usage data by applying a
+ * calculation to one or more simple Aggregations or Custom Fields. These numerical measures
+ * can then be used as pricing metrics to price your Product Plans, enabling you to
+ * implement a wide range of usage-based pricing use cases.
+ *
+ * You can create two types of Compound Aggregation:
+ *
+ * **Global**
+ * - Pricing: Not tied to any specific product and can be used to price Plans belonging to
+ * any Product.
+ * - Calculation: can reference all simple Aggregations - both Global simple Aggregations
+ * and any product-specific simple Aggregations.
+ *
+ * **Product-specific**
+ * - Pricing: belong to a specific Product and can only be used to price Plans belonging to
+ * the same Product.
+ * - Calculation: can reference any simple Aggregations belonging to the same Product and
+ * any Global simple Aggregations.
+ *
+ * **IMPORTANT!** If a simple Aggregation referenced by a Compound Aggregation has a
+ * **Quantity per unit** defined or a **Rounding** defined, these will not be factored into
+ * the value used by the calculation. For example, if the simple Aggregation referenced has
+ * a base value of 100 and has **Quantity per unit** set at 10, the Compound Aggregation
+ * calculation *will use the base value of 100 not 10*.
+ *
+ * To better understand and use Compound Aggregations, refer to the example
+ * [Compound Aggregation Use Case](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/compound-aggregations#example-use-case)
+ * in the m3ter documentation.
+ */
fun compoundAggregations(): CompoundAggregationService.WithRawResponse
+ /**
+ * Endpoints for Contract related operations such as creation, update, list and delete.
+ *
+ * Contracts are created for Accounts, which are your end-user customers. Contracts can be
+ * used for:
+ * * **Accounts Reporting**. To serve your general accounting operations and processes, you
+ * can report on total Contract values for an Account.
+ * * **Contract Billing**. Various billing entities associated with an Account can be linked
+ * to Contracts on the Account to meet your specific Contract billing use cases.
+ */
fun contracts(): ContractService.WithRawResponse
+ /**
+ * Endpoints for listing, creating, retrieving, updating, or deleting Counters.
+ *
+ * You can create Counters for your m3ter Organization, which can then be used as pricing
+ * metrics to apply a unit-based
+ * [CounterPricing](https://www.m3ter.com/docs/api#tag/CounterPricing) to Product Plans or
+ * Plan Templates for recurring subscription charges on Accounts.
+ *
+ * Counters can then be used to post
+ * [CounterAdjustments](https://www.m3ter.com/docs/api#tag/CounterAdjustments) on your
+ * end-customer Accounts.
+ *
+ * Accounts are then billed in accordance with the CounterPricing on Plans attached to the
+ * Accounts and for the actual Counter quantities Accounts subscribe to. See
+ * [Recurring Charges: Counters](https://www.m3ter.com/docs/guides/recurring-charges-counters)
+ * in our main user documentation for more details.
+ */
fun counters(): CounterService.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterAdjustments.
+ *
+ * If you attach a Plan to an Account which is priced using a Counter to apply unit-based
+ * pricing, you can then create CounterAdjustments for the Account using that Counter to
+ * ensure the Account is billed according to the number of Counter units the Account
+ * subscribes to in a given billing period.
+ *
+ * See
+ * [Understanding and Creating Counter Adjustments for Accounts](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counter-adjustments-for-accounts)
+ * for more information.
+ */
fun counterAdjustments(): CounterAdjustmentService.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterPricing.
+ *
+ * Create the CounterPricing for a Plan/PlanTemplate using a Counter, and define a
+ * unit-based pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Creating Counters and Pricing Plans](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counters)
+ * for more information.
+ */
fun counterPricings(): CounterPricingService.WithRawResponse
+ /**
+ * Endpoints for CreditReason operations such as creation, update, list, and delete.
+ *
+ * You can create CreditReasons for your Organization, and then use them when creating a
+ * credit line item on a bill, or applying a product credit to a bill. CreditReasons provide
+ * contextual information as to why a credit was applied.
+ */
fun creditReasons(): CreditReasonService.WithRawResponse
+ /**
+ * Endpoints for Currency operations such as creation, update, list, and delete. Currencies
+ * are stored for your Organization, and can then be used to specify currencies on various
+ * entities such as plan groups and plan templates.
+ *
+ * **IMPORTANT!** The Currencies you want to use in your Organization must be created first.
+ *
+ * The currency you select for your Organization determines the billing currency and
+ * overrides any currency settings in your pricing Plans. For example, if the Organization
+ * currency is set to USD and a pricing Plan used for an Account is set to GBP, the bill for
+ * an Account using that Plan is calculated in GBP, and then each bill line item converted
+ * to USD amounts.
+ *
+ * Currency conversion rates are setup in the *OrganizationConfig*. For more details, see
+ * [Creating and Managing Currencies](https://www.m3ter.com/docs/guides/organization-and-access-management/viewing-and-editing-organization#creating-and-managing-currencies)
+ * in the m3ter Documentation.
+ */
fun currencies(): CurrencyService.WithRawResponse
+ /**
+ * Endpoints for retrieving and updating Custom Fields at the Organization level for all
+ * entities that support them.
+ *
+ * Custom Fields in m3ter allow you to store custom data in the form of number or string
+ * values against m3ter entities in a way that does not directly affect the normal working
+ * operation of the m3ter platform. Having this capability to store data in a free-hand
+ * fashion can prove very useful in helping you to meet specific usage-based pricing and
+ * other operational business use cases.
+ *
+ * However, you can exploit the values stored on Custom Fields in a more direct way by
+ * referencing them in Derived Field and Compound Aggregation calculations. Given the key
+ * role these calculations can play when implementing usage-based pricing schema, any Custom
+ * Fields you reference will then affect how the platform behaves. Referencing Custom Field
+ * values in your calculations offers a much wider scope of options when it comes to
+ * resolving complex usage-based pricing use cases.
+ *
+ * Custom Fields can be added to the following entities at Organizational level:
+ * * Organization
+ * * Account
+ * * AccountPlan
+ * * Aggregation
+ * * Compound Aggregation
+ * * Meter
+ * * Product
+ * * Plan
+ * * PlanTemplate
+ * * Contract
+ *
+ * These all follow the same pattern - a new *(optional)* field is available on the entity
+ * request and response bodies called "customFields" which is a object in this format:
+ * ```
+ * "customFields": {
+ * "exampleCustomField1": 7.1,
+ * "exampleCustomField2": "stringValue"
+ * }
+ * ```
+ *
+ * The value for a Custom Field can be a string or a number.
+ *
+ * **Using Custom Field values in calculations:**
+ * - You can add Custom Fields at two levels - the Organization level and the individual
+ * entity level.
+ * - The Organizational level field provides a default value and *must be added* if you want
+ * to also add a Custom Field of the same name at the corresponding individual entity
+ * level. If you reference the Custom Field in a calculation, the value for the individual
+ * entity level field is used. If no field is defined at individual entity level, then the
+ * Organization level field value is used.
+ *
+ * **Important: Constraints and Exceptions!**
+ *
+ * **Custom Fields at Organization Level**. Currently, you cannot create Custom Fields at
+ * the Organization-level for the following enitites:
+ * * Plan Group
+ * * Balance
+ * * Balance Transaction Schedule
+ * * Balance Charge Schedule
+ *
+ * Therefore you cannot reference the Custom Fields values created at the individual entity
+ * level for these entities in your Derived Field or Compound Aggregation calculations.
+ *
+ * **Derived Field Calculations**. You can *only reference Custom Fields* for the following
+ * entities:
+ * * Organization
+ * * Meter
+ * * Account
+ *
+ * However, if you are using Meters belonging to *a specific Product*, that is, not *Global
+ * Meters*, you can also reference Custom Fields added to a Product in Derived Field
+ * calculations.
+ *
+ * **Compound Aggregation Calculations - Meter Custom Fields**. The value of the
+ * *Organization level Meter Custom Field will always be used*, even if you have defined a
+ * corresponding field at the individual Meter level.
+ *
+ * See
+ * [Working with Custom Fields](https://www.m3ter.com/docs/guides/creating-and-managing-products/working-with-custom-fields)
+ * in the m3ter documentation for more information.
+ */
fun customFields(): CustomFieldService.WithRawResponse
+ /**
+ * Endpoints for triggering one-off, ad-hoc Data Exports. You can set up and run ad-hoc
+ * Exports to export two kinds of data from your m3ter Organization:
+ * * Usage data.
+ * * Operational data for entities.
+ *
+ * **Ad-Hoc Export Destinations** When setting up and running an ad-hoc Export:
+ * * You can define one or more Export Destinations - see the
+ * [ExportDestination](https://www.m3ter.com/docs/api#tag/ExportDestination) section of
+ * this API Reference. When the export runs, the data is sent through to the sepecified
+ * Destination. However, the export file is also made available for you to download it
+ * locally.
+ * * You can set up and run Data Exports without defining a Destination. The data is not
+ * exported but the compiled export file is made available for downloading locally.
+ * * For details on downloading an export file, see the
+ * [Get Data Export File Download URL](https://www.m3ter.com/docs/api#tag/ExportDestination/operation/GenerateDataExportFileDownloadUrl)
+ * endpoint in this API Reference.
+ *
+ * **Preview Version!** The Data Export feature is currently available only in Preview
+ * release version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Preview release definition. ExportAdHoc endpoints will only be available if Data
+ * Export has been enabled for your Organization. For more details see
+ * [Data Export(Preview)](https://www.m3ter.com/docs/guides/data-exports) in our main User
+ * documentation. If you're interested in previewing the Data Export feature, please get in
+ * touch with m3ter Support or your m3ter contact.
+ */
fun dataExports(): DataExportService.WithRawResponse
+ /**
+ * Endpoints for DebitReason operations such as creation, update, list, and delete.
+ *
+ * You can create DebitReasons for your Organization, and then use them when creating a
+ * debit line item on a bill, or applying a product debit to a bill. DebitReasons provide
+ * contextual information as to why a debit was applied.
+ */
fun debitReasons(): DebitReasonService.WithRawResponse
+ /**
+ * This section provides Endpoints for operations that allow you to retrieve detailed
+ * information about individual Events, list all Events or specific Event Types, and explore
+ * dynamic fields available for each Event Type.
+ *
+ * Events encompass specific instances of state changes within the system, such as the
+ * creation of a new Prepayment/Commitment for an Account. Each Event is classified under an
+ * Event Type framework, providing context about what kind of change occurred to generate
+ * the Event.
+ *
+ * **Events for Configuration and Billing Entities**
+ *
+ * Many Event Types cover common configuration and billing objects, where the Event is
+ * generated for a state change of one of these objects - for when the configuration or
+ * billing object is **created**, **deleted**, or **updated**.
+ *
+ * For example:
+ * * configuration.commitment.created
+ * * configuration.commitment.deleted
+ * * configuration.commitment.updated
+ * * configuration.account.created
+ * * configuration.account.deleted
+ * * configuration.account.updated
+ * * billing.bill.created
+ * * billing.bill.deleted
+ * * billing.bill.created
+ *
+ * **Events for Errors or Failures**
+ *
+ * There are also Event Types for certain kinds of error that can occur:
+ * * For an Integration:
+ * * validation
+ * * authentication
+ * * perform
+ * * missing account mapping
+ * * disabled
+ * * For a Usage Data Ingest Submission:
+ * * validation failure
+ * * For Data Export Jobs:
+ * * data export job failure
+ *
+ * **Scheduled Events**
+ *
+ * In addition to system-generated Events that occur when a configuration entity undergoes a
+ * state change at creation, update, or deletion of the entity, you can use API calls to
+ * create and configure *Scheduled Event Configurations*. Scheduled Events are custom Event
+ * types, which you can set up by referencing Date/Time fields on configuration and billing
+ * entities. See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference for more details.
+ *
+ * **Notifications for Events**
+ *
+ * You can create Notification rules based on Events and these rules can reference and apply
+ * calculations to the Event's fields. This allows you to set up customized alerts to be
+ * sent out via webhooks when the Event occurs and any conditions you've built into the
+ * Notification rule's calculation are satisfied.
+ *
+ * See the [Notifications](https://www.m3ter.com/docs/api#tag/Notifications) section for
+ * more details.
+ *
+ * **Other Events**
+ *
+ * When Events occur, they can cause other Events, such as when a Notification is triggered
+ * by the Event it is based on. For these Events there are currently two categories:
+ * * Notification
+ * * IntegrationEvent
+ *
+ * Also see
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * and
+ * [Object Definitions and API Calls](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications/object-definitions-and-api-calls)
+ * in the m3ter documentation for more guidance.
+ */
fun events(): EventService.WithRawResponse
+ /**
+ * Endpoints for managing External Mapping related operations such as creation, update, list
+ * and delete.
+ *
+ * When you integrate your 3rd-party systems with the m3ter platform, a mapping between
+ * entities in the local system *(m3ter)* and external systems is constructed. This
+ * *External Mapping* is crucial in scenarios where data from external systems is consumed
+ * or where data from the local system is to be synchronized with external systems.
+ *
+ * When you are working to set up your Integrations and want to test or troubleshoot your
+ * implementation before going live, you might need to create External Mappings manually
+ * and, at a later date, edit or delete them.
+ */
fun externalMappings(): ExternalMappingService.WithRawResponse
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the
+ * m3ter platform. The integration endpoints in this section facilitate various operations
+ * such as creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing,
+ * billing and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
fun integrationConfigurations(): IntegrationConfigurationService.WithRawResponse
+ /**
+ * Endpoints for creating/updating/deleting Lookup Tables.
+ *
+ * Lookup Tables enable you to manage dynamic data mappings that your calculations
+ * reference. Use them for currency conversion, pricing tiers, discount rates, and similar
+ * scenarios where you require values to change operationally but for calculation logic to
+ * remain constant.
+ *
+ * **Beta Version!** The Lookup Table feature is currently available in Beta release
+ * version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition. Lookup Table endpoints will only be available if Lookup
+ * Tables have been enabled for your Organization. For more details see
+ * [Lookup Tables (Beta)](https://www.m3ter.com/docs/guides/lookup-tables) in our main User
+ * documentation.
+ */
fun lookupTables(): LookupTableService.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Meters.
+ *
+ * Use Meters to submit usage data for the consumption of your products and services by end
+ * customers. This usage data then becomes the basis for setting up usage-based pricing for
+ * your products and services.
+ *
+ * Examples of usage data collected in Meters:
+ * * Number of logins.
+ * * Duration of session.
+ * * Amount of data downloaded.
+ *
+ * To collect usage data and ingest it into the platform, you can define two types of fields
+ * for Meters:
+ * - `dataFields` Used to collect raw usage data measures - numeric quantitative data values
+ * or non-numeric point data values.
+ * - `derivedFields` Used to derive usage data measures that are the result of applying a
+ * calculation to `dataFields`, `customFields`, or system `Timestamp` fields.
+ *
+ * You can also:
+ * - Create `customFields` for a Meter, which allows you to attach custom data to the Meter
+ * as name/value pairs.
+ * - Create Global Meters, which are not tied to a specific Product and allow you to collect
+ * usage data that will form the basis of usage-based pricing across multiple Products.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally
+ * Identifiable Information (PII) in m3ter is restricted to a few fields on the **Account**
+ * entity. Please ensure that any fields you configure for Meters, such as Data Fields or
+ * Derived Fields, do not contain any end-customer PII data. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for
+ * more details.
+ *
+ * See also:
+ * - [Reviewing Meter
+ * Options](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/reviewing-meter-options).
+ */
fun meters(): MeterService.WithRawResponse
+ /**
+ * This section provides endpoints for managing Event Notifications.
+ *
+ * You can create Notifications based on system Events generated by the platform. When you
+ * base a Notification on a specific Event type, you can include a calculation that
+ * references the fields available on that Event type to define precise conditions that must
+ * be met for the Notification to be triggered when an Event of that type occurs. In this
+ * way, you can set up highly customized Notifications that act as timely alerts to inform
+ * you about significant occurrences within your Organization. For instance, if you provide
+ * a sign-up bonus to new end-customer Accounts, you can set up a Notification to alert you
+ * when an end-customer Account has used up a certain percentage of their bonus credit.
+ *
+ * You can also set up Notifications based on Scheduled Event types you've created for your
+ * Organization. See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference and
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our user documentation.
+ *
+ * For more details on Event types and their fields, see the
+ * [Events](https://www.m3ter.com/docs/api#tag/Events) section.
+ *
+ * For detailed guidance on working with Events and Notifications, refer to the
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * section of the m3ter user documentation.
+ */
fun notificationConfigurations(): NotificationConfigurationService.WithRawResponse
+ /**
+ * Endpoints for retrieving or updating the Organization Config.
+ *
+ * Organization represents your company as a direct customer of m3ter. Use Organization
+ * configuration to define *Organization-wide* settings. For example:
+ * - Timezone.
+ * - Currencies and currency conversions.
+ * - Billing operations settings, such as:
+ * - Epoch dates to control first billing dates.
+ * - Whether to bill customer accounts in advance/in arrears for standing charge
+ * amounts, minimum spend amounts, and commitment fees.
+ *
+ * For other aspects of your Organization setup and configuration, see the following
+ * sections in this API Reference:
+ * * [Custom Fields](https://www.m3ter.com/docs/api#tag/CustomField)
+ * * [Currencies](https://www.m3ter.com/docs/api#tag/Currency)
+ * * [Credit Reasons](https://www.m3ter.com/docs/api#tag/CreditReason)
+ * * [Debit Reason](https://www.m3ter.com/docs/api#tag/DebitReason)
+ * * [Transaction Types](https://www.m3ter.com/docs/api#tag/TransactionType)
+ *
+ * See also:
+ * - [Managing your
+ * Organization](https://www.m3ter.com/docs/guides/managing-organization-and-users/viewing-and-editing-organization).
+ */
fun organizationConfig(): OrganizationConfigService.WithRawResponse
+ /**
+ * Endpoints for Permission Policy related operations such as creation, update, add and
+ * retrieve.
+ *
+ * Permission Policies can restrict or grant access to specific resources for both Users
+ * *(people)* and Service Users *(automated processes with direct API access)*. This enables
+ * you to control precisely what a User can do in your m3ter Organization.
+ *
+ * For more details, see
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/organization-and-access-management/creating-and-managing-permissions#permission-policy-statements---available-actions-and-resources)
+ * in our main Documentation.
+ */
fun permissionPolicies(): PermissionPolicyService.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Plans.
+ *
+ * A Plan is based on a PlanTemplate and represents a specific pricing plan for one of your
+ * products or services. Each Plan inherits general billing attributes or pricing structure
+ * from its parent Plan Template. Some attributes can be overriden for the specific Plan.
+ *
+ * When you've created the Plan Templates and Plans you need for your Products, you can
+ * configure the exact pricing structures for Plans to charge customers that consume one or
+ * more of your Products.
+ *
+ * You can then attach the appropriately priced Plans to customer Accounts to create
+ * [Account Plans](https://www.m3ter.com/docs/api#tag/AccountPlan) and enable charges to be
+ * calculated correctly for billing against those Accounts.
+ *
+ * See also:
+ * - [Reviewing Options for Plans and Plan
+ * Templates](https://www.m3ter.com/docs/guides/working-with-plan-templates-and-plans/reviewing-configuration-options-for-plans-and-plan-templates).
+ */
fun plans(): PlanService.WithRawResponse
+ /**
+ * Endpoints for PlanGroup related operations such as creation, update, retrieve, list and
+ * delete.
+ *
+ * PlanGroups are constructs that group multiple plans together. This enables a unified
+ * approach to efficiently handle various uses cases across different plans. For example
+ * applying a minimum spend amount at billing, across several of your products or features
+ * that are each priced separately.
+ */
fun planGroups(): PlanGroupService.WithRawResponse
+ /**
+ * Endpoints for PlanGroupLink related operations such as creation, update, list and delete.
+ *
+ * PlanGroupLinks are the intersection table between a PlanGroup and its associated Plans. A
+ * PlanGroupLink is only created when at least 1 Plan is linked to a PlanGroup.
+ */
fun planGroupLinks(): PlanGroupLinkService.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting PlanTemplates.
+ *
+ * Use PlanTemplates to define default values for Plans. These default values control the
+ * billing operations you want applied to your products. PlanTemplates avoid repetition in
+ * configuration work - many Plans will share settings for billing operations and differ
+ * only in the details of their pricing structures.
+ *
+ * A PlanTemplate is linked to a Product, and each Plan is a child of a PlanTemplate.
+ */
fun planTemplates(): PlanTemplateService.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Pricing.
+ *
+ * Create the Pricing for a Plan/PlanTemplate with usage data Aggregations, and define a
+ * usage-based pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Reviewing Pricing Options for Plans and Plan Templates](https://www.m3ter.com/docs/guides/pricing-plans/reviewing-pricing-options-and-pricing-plans)
+ * for more information.
+ */
fun pricings(): PricingService.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Products.
+ *
+ * A Product represents the products and services you offer to your end customers. Products
+ * act as a container for the Meters, Aggregations, Pricing, and Plans required to implement
+ * usage-based and other pricing models for your Organization.
+ */
fun products(): ProductService.WithRawResponse
+ /**
+ * Endpoints for ResourceGroup related operations such as creation, update, list and delete.
+ *
+ * ResourceGroups are used in the context of Permission Policies, which controls what a User
+ * who has been given access to your Organization can and cannot do. For example, you might
+ * want to create a Permissions Policy that denies Users the ability to retrieve Meters.
+ *
+ * Resources are defined as m3ter Resource Identifiers *(MRIs)* in the format:
+ * ```
+ * service:resource-type/item-type/id
+ * ```
+ *
+ * Where:
+ * * service is a distinct part of the overall m3ter system, and which forms a natural
+ * functional grouping, such as "config" or "billing".
+ * * resource-type is the resource type item accessed - for example: "Plan", "Meter", "Bill"
+ * * item-type is one of:
+ * * "item" - to specify an individual item.
+ * * "group" - to specify a resource group.
+ * * id is the resource group id or the resource item id
+ *
+ * Resources can be assigned to one or more ResourceGroups. For example, a Plan can be
+ * assigned to Plan ResourceGroups, a Meter can be assigned to Meter ResourceGroups, and so
+ * on. This is useful for cases where you want to create Permission Policies which allow or
+ * deny access to a specific subset of resources. For example, grant a user access to only
+ * some of the Plans in your Organization.
+ *
+ * This concept of grouping resources applies to every resource in m3ter, including
+ * ResourceGroups themselves. This allows you to nest ResourceGroups to support hierarchies
+ * of groups.
+ *
+ * See
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/managing-organization-and-users/creating-and-managing-permissions)
+ * in the m3ter documentation for more information.
+ *
+ * **Note: User Resource Groups** You can create a User Resource Group to group resources of
+ * type = `user`. You can then retrieve a list of the User Resource Groups a user belongs
+ * to. For more details, see the
+ * [Retrieve OrgUser Groups](https://www.m3ter.com/docs/api#tag/OrgUsers/operation/GetOrgUserGroups)
+ * call in the OrgUsers section.
+ */
fun resourceGroups(): ResourceGroupService.WithRawResponse
+ /**
+ * Endpoints for retrieving and managing scheduled Events' configurations.
+ *
+ * Scheduled Event Configurations define custom Event types that reference Date/Time fields
+ * belonging to configuration and billing entities. They therefore provide you with an extra
+ * degree of flexibility over and above system-generated Events for setting up Notifications
+ * based on Events.
+ *
+ * For more details, see the
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our Documenation.
+ */
fun scheduledEventConfigurations(): ScheduledEventConfigurationService.WithRawResponse
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights
+ * into the consumption patterns and charges of your end-customer Accounts.
+ */
fun statements(): StatementService.WithRawResponse
+ /**
+ * Endpoints for TransactionType operations such as creation, update, list, retrieve, and
+ * delete.
+ *
+ * You can create TransactionTypes for your Organization, which can then be used when
+ * creating and updating Balances. Example TransactionTypes: "Balance Amount" or "Add
+ * Funds".
+ *
+ * For details on creating a Transaction amount for a Balance using a TransactionType you've
+ * created for your Organization, see the
+ * [Create Balance Transaction](https://www.m3ter.com/docs/api#tag/Balances/operation/PostBalanceTransaction)
+ * call in the [Balances](https://www.m3ter.com/docs/api#tag/Balances) section of this API
+ * Reference.
+ */
fun transactionTypes(): TransactionTypeService.WithRawResponse
fun usage(): UsageService.WithRawResponse
fun users(): UserService.WithRawResponse
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the
+ * m3ter platform. The integration endpoints in this section facilitate various operations
+ * such as creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing,
+ * billing and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
fun webhooks(): WebhookService.WithRawResponse
}
}
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClientAsync.kt b/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClientAsync.kt
index 0f16a4f6..89e50b40 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClientAsync.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClientAsync.kt
@@ -82,86 +82,937 @@ interface M3terClientAsync {
*/
fun withOptions(modifier: Consumer): M3terClientAsync
+ /**
+ * Endpoint for retrieving a JSON Web Token (JWT) bearer token for a ServiceUser using the
+ * Client Credentials Grant flow.
+ *
+ * A ServiceUser represents the automated process you want to grant access to your
+ * Organization - that is, as an API user.
+ */
fun authentication(): AuthenticationServiceAsync
+ /**
+ * Endpoints for Account related operations such as creation, update, list and delete. An
+ * Account represents one of your end-customer accounts.
+ *
+ * Accounts do not belong to a Product to allow for cases where an end customer takes more than
+ * one of your Products, and the charges for these Products differ.
+ *
+ * You typically attach a priced Plan or Plan Template to an Account before you can generate
+ * bills for the Account:
+ * - If a customer consumes several of your Products, you can attach a priced Plan or Plan
+ * Template to the Account for charging against each Product.
+ * - If an Account is charged solely on the basis of an agreed Prepayment/Commitment amount but
+ * not all of the Prepayment is prepaid, you can use a customized billing schedule for
+ * outstanding fees without having to attach a Plan to the Account to generate Bills.
+ *
+ * You can create Child Accounts for end customers who hold multiple Accounts with you. You can
+ * then set up billing for the Parent/Child Account usage to have the end-customer billed once
+ * for the Parent Account, instead of having separate bills issued for usage against each of
+ * their multiple Accounts.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally Identifiable
+ * Information (PII) in m3ter is restricted to a few fields on the **Account** entity. Please
+ * ensure that only the ``name``, ``address``, or ``emailAddress`` fields contain any
+ * end-customer PII data on any Accounts you create. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for more
+ * details.
+ */
fun accounts(): AccountServiceAsync
+ /**
+ * Endpoints for AccountPlan and AccountPlanGroup related operations such as creation, update,
+ * list and delete.
+ *
+ * **AccountPlans** An Account represents one of your end-customer accounts. To create an
+ * AccountPlan, you attach a Product Plan to an Account. The AccountPlan then determines the
+ * charges incurred at billing by your end customer for consuming the Product the Plan is for:
+ * * **AccountPlan Active/Inactive**. Set start and end dates to define the period the
+ * AccountPlan is active for the Account.
+ * * **AccountPlan per Product**. If an end customer consumes multiple Products, create separate
+ * AccountPlans to charge for each Product.
+ *
+ * **AccountPlan Constraints:**
+ * * Only one AccountPlan per Product can be active at any one time for an Account.
+ * * If you create a Plan as a custom Plan for a specific Account, you can only use it to create
+ * an AccountPlan for that Account.
+ *
+ * **AccountPlanGroups** Plan Groups are used when you want to apply a minimum spend amount at
+ * billing across several of your Products each of which are priced separately - when you create
+ * the Plan Group, you define an overall minimum spend and then add any priced Plans you want to
+ * include in the Group. To create an AccounPlanGroup, you can attach a Plan Group to an Account
+ * that consumes the separate Products which are priced using the included Plans. At billing,
+ * the minimum spend you've defined for the Plan Group is applied:
+ * * **Active AccountPlanGroup**. Set the start and end dates to define the period for which the
+ * Plan Group will be active for the Account.
+ *
+ * **Plan Group Notes:**
+ * * You can only add *one Plan for the same Product* to a Plan Group. See the
+ * [Plan Group](https://www.m3ter.com/docs/api#tag/PlanGroup) in this API Reference for more
+ * details on creating Plan Groups.
+ * * You can create a *custom Plan Group* for an Account, which means the Plan Group can only be
+ * attached to that Account to create an AccountPlanGroup.
+ *
+ * **AcountPlanGroup - Notes and Constraints:**
+ * * **AccountPlanGroup is type of AccountPlan** When you attach a Plan Group to an Account,
+ * this creates an AccountPlanGroup. However, the m3ter data model *does not support a
+ * separate AccountPlanGroup entity*, and an AccountPlanGroup is a type of AccountPlan where a
+ * `planGroupId` is used instead of a `planId` when it's created. See the
+ * [Create AccountPlan](https://www.m3ter.com/docs/api#tag/AccountPlan/operation/PostAccountPlan)
+ * call in this section and
+ * [Attaching Plan Groups to an Account](https://www.m3ter.com/docs/guides/end-customer-accounts/attaching-plan-groups-to-an-account)
+ * in our main User Documentation.
+ * * **Multiple AccountPlan Groups:** You can attach more than one Plan Group to an Account to
+ * create multiple AccountPlanGroups, but the rule that *only one attached Plan per Product
+ * can be active at any one time for an Account* is preserved:
+ * * Multiple attached Plan Groups on an Account can have overlapping dates only if none of
+ * the Plan Groups contain a Plan belonging to the same Product. If you try to attach a
+ * Plan Group to an Account with Plan Groups already attached and:
+ * * The new Plan Group contains a Product Plan that also belongs to a Plan Group
+ * already attached to the Account.
+ * * The dates for these "matched Plan" Plan Groups being active for the Account would
+ * overlap.
+ * * Then you'll receive an error and the attachment will be blocked.
+ */
fun accountPlans(): AccountPlanServiceAsync
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Aggregations.
+ *
+ * An Aggregation links to a Meter and targets a Data Field or Derived Field on the Meter. You
+ * define the method of aggregation used to convert the usage data collected by the targeted
+ * Meter field into a numerical unit of measurement.
+ *
+ * You can then use the unit of measurement an Aggregation yields as a metric for pricing
+ * Product Plans and apply usage-based pricing to your products and services. You might also
+ * want to aggregate raw data measures for other purposes, such as to feed into analytical or
+ * business performance tools.
+ *
+ * **Notes:**
+ * * **Contrast with Compound Aggregations**. Standard or simple Aggregations of this type,
+ * which apply an aggregation method directly to Meter usage data fields, are contrasted with
+ * [Compound Aggregations](https://www.m3ter.com/docs/api#tag/CompoundAggregation). A Compound
+ * Aggregation typically references one or more simple Aggregations and applies a calculation
+ * to them to derive pricing metrics needed to serve more complex usage-based pricing
+ * scenarios.
+ * * **Segmented Aggregations**. Segmented Aggregations allow you to segment the usage data
+ * collected by a single Meter. This capability is very useful for implementing some pricing
+ * and billing use cases. See
+ * [Segmented Aggregations](https://www.m3ter.com/docs/guides/usage-data-aggregations/segmented-aggregations)
+ * in our main documentation for more details.
+ */
fun aggregations(): AggregationServiceAsync
+ /**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative
+ * Transaction amounts for the Balance. To do this, you must first define Transaction Types for
+ * your Organization, and then use one of these Transaction Types when you add a specific
+ * Transaction to a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their
+ * Account, which can then be draw-down against charges due for product or service consumption.
+ * You can include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an
+ * initial free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This acts as
+ * an initial commitment, which allows them to use the service and gain an accurate insight
+ * into their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to subsequent
+ * Bills as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have
+ * agreed to pay for consuming your product or services across a full contract term. A customer
+ * might pay the entire or only part of the agreed amount upfront, but ***the commitment or
+ * prepayment amount is payable regardless of the actual usage by the customer of your service
+ * or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used when a
+ * customer wants to add a credit amount to their Account at any time during the service period
+ * or when you as service provider want to add a credit to a customer Account. This Balance
+ * credit can then be drawn-down against for billing the Account for usage, minimum spend,
+ * standing charges, or recurring charges due. Balances therefore serve payment use cases in a
+ * more flexible way, for example to be used for a "Free Credit" sign-up scheme you offer to
+ * encourage sales or to enhance customer satisfaction by adding credit to an Account to
+ * compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Commitment credit on
+ * an Account is drawn-down - Balance amounts first or Commitment/Prepayment amounts first.
+ */
fun balances(): BalanceServiceAsync
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights into
+ * the consumption patterns and charges of your end-customer Accounts.
+ */
fun bills(): BillServiceAsync
+ /**
+ * Endpoints for updating and retreiving the Bill Configuration for an Organization. The
+ * Organization represents your company as a direct customer of the m3ter service.
+ *
+ * You can use the **Update BillConfig** endpoint to set a global lock date for **all** Bills -
+ * any Bill with a service period end date on or before the set date will be locked and cannot
+ * be updated.
+ *
+ * **Warning: Ensure all Bills are Approved!** If you try to set a global lock date when there
+ * remains Bills in a *Pending* state whose service period end date is on or before the
+ * specified lock date, then you'll receive an error.
+ */
fun billConfig(): BillConfigServiceAsync
+ /**
+ * Endpoints that manage Commitments *(also known as Prepayments)* in the context of usage-based
+ * pricing and billing. A Commitment represents an agreement where the end-customer has agreed
+ * to pay a fixed minimum amount throughout the contract period. ***The commitment amount is
+ * payable regardless of the actual usage by the customer of your service or product.***
+ *
+ * These endpoints enable the creation, updating, retrieval, and deletion of Commitments. Use
+ * them to manage your customer's Commitments and ensure optimal revenue recognition:
+ * * Specify which type of charges can draw-down against a Commitment amount on an Account at
+ * billing: usage, minimum spend, standing charges, or recurring charges.
+ * * Define overage surcharge percentages, which are applied when the usage charges exceed the
+ * agreed Commitment amount within the contract duration.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments/Prepayments are used for amounts end-customers have agreed to pay for consuming
+ * your product or services across a full contract term. A customer might pay the entire or only
+ * part of the agreed amount upfront, but ***the prepayment amount is payable regardless of the
+ * actual usage by the customer of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used when a
+ * customer wants to add a credit amount to their Account at any time during the service period
+ * or when you as service provider want to add a credit to a customer Account. This Balance
+ * credit can then be drawn-down against for billing the Account for usage, minimum spend,
+ * standing charges, or recurring charges due. Balances therefore serve payment use cases in a
+ * more flexible way, for example to be used for a "Free Credit" sign-up scheme you offer to
+ * encourage sales or to enhance customer satisfaction by adding credit to an Account to
+ * compensate for service delivery issues.
+ *
+ * You can use Prepayments/Commitments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Prepayment credit on
+ * an Account is drawn-down - Balance amounts first or Prepayment amounts first.
+ *
+ * #### Billing for Commitments
+ *
+ * If not all of an agreed Commitment amount is paid at the start of an end-customer contract
+ * period, you can choose one of two options for billing the outstanding fees due on the
+ * customer Account:
+ * - Select a Product *Plan to bill with*.
+ * - Define a *schedule of billing dates*.
+ */
fun commitments(): CommitmentServiceAsync
+ /**
+ * Endpoints for creating, retrieving, listing, and cancelling Bill Jobs.
+ *
+ * Bill Jobs are critical components in billing management, providing asynchronous mechanisms to
+ * calculate and handle bills.
+ *
+ * Bill Jobs give you the flexibiity to run Bills manually for Accounts to suit different
+ * billing management purposes. For example, some historical usage data has come in for an
+ * Account and you want to run a Bill for a specific date on that Account to check that the Bill
+ * is showing correctly for the charges due on the new usage data.
+ */
fun billJobs(): BillJobServiceAsync
+ /**
+ * Endpoints for creating/updating/deleting Charges.
+ *
+ * Create Charges for your end-customer Accounts to create ad-hoc line items for Account
+ * billing. Charges are:
+ * * Created for either debit or credit amounts.
+ * * Linked to a Product for accounting purposes.
+ * * Optionally linked to a Contract.
+ * * Given a specific date for billing. When a bill job has run for the specified Charge bill
+ * date, a Charge appears as an Ad-hoc line item on the Bill.
+ * * Assigned a service period.
+ * * Available in any currency defined for your Organization. See
+ * [Creating Charges for Accounts](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-charges-for-accounts)
+ * in our main user documentation for more details.
+ *
+ * Alternatively, you can create a Charge for a Balance on an end-customer Account to create
+ * balance fee line items for Account billing. See
+ * [Creating Charges for Balances](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-balances-for-accounts/creating-charges-for-balances)
+ * in our main user documentation for more details.
+ */
fun charges(): ChargeServiceAsync
+ /**
+ * Endpoints for Compound Aggregation related operations such as creation, update, list and
+ * delete.
+ *
+ * Use Compound Aggregations to create numerical measures from usage data by applying a
+ * calculation to one or more simple Aggregations or Custom Fields. These numerical measures can
+ * then be used as pricing metrics to price your Product Plans, enabling you to implement a wide
+ * range of usage-based pricing use cases.
+ *
+ * You can create two types of Compound Aggregation:
+ *
+ * **Global**
+ * - Pricing: Not tied to any specific product and can be used to price Plans belonging to any
+ * Product.
+ * - Calculation: can reference all simple Aggregations - both Global simple Aggregations and
+ * any product-specific simple Aggregations.
+ *
+ * **Product-specific**
+ * - Pricing: belong to a specific Product and can only be used to price Plans belonging to the
+ * same Product.
+ * - Calculation: can reference any simple Aggregations belonging to the same Product and any
+ * Global simple Aggregations.
+ *
+ * **IMPORTANT!** If a simple Aggregation referenced by a Compound Aggregation has a **Quantity
+ * per unit** defined or a **Rounding** defined, these will not be factored into the value used
+ * by the calculation. For example, if the simple Aggregation referenced has a base value of 100
+ * and has **Quantity per unit** set at 10, the Compound Aggregation calculation *will use the
+ * base value of 100 not 10*.
+ *
+ * To better understand and use Compound Aggregations, refer to the example
+ * [Compound Aggregation Use Case](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/compound-aggregations#example-use-case)
+ * in the m3ter documentation.
+ */
fun compoundAggregations(): CompoundAggregationServiceAsync
+ /**
+ * Endpoints for Contract related operations such as creation, update, list and delete.
+ *
+ * Contracts are created for Accounts, which are your end-user customers. Contracts can be used
+ * for:
+ * * **Accounts Reporting**. To serve your general accounting operations and processes, you can
+ * report on total Contract values for an Account.
+ * * **Contract Billing**. Various billing entities associated with an Account can be linked to
+ * Contracts on the Account to meet your specific Contract billing use cases.
+ */
fun contracts(): ContractServiceAsync
+ /**
+ * Endpoints for listing, creating, retrieving, updating, or deleting Counters.
+ *
+ * You can create Counters for your m3ter Organization, which can then be used as pricing
+ * metrics to apply a unit-based
+ * [CounterPricing](https://www.m3ter.com/docs/api#tag/CounterPricing) to Product Plans or Plan
+ * Templates for recurring subscription charges on Accounts.
+ *
+ * Counters can then be used to post
+ * [CounterAdjustments](https://www.m3ter.com/docs/api#tag/CounterAdjustments) on your
+ * end-customer Accounts.
+ *
+ * Accounts are then billed in accordance with the CounterPricing on Plans attached to the
+ * Accounts and for the actual Counter quantities Accounts subscribe to. See
+ * [Recurring Charges: Counters](https://www.m3ter.com/docs/guides/recurring-charges-counters)
+ * in our main user documentation for more details.
+ */
fun counters(): CounterServiceAsync
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterAdjustments.
+ *
+ * If you attach a Plan to an Account which is priced using a Counter to apply unit-based
+ * pricing, you can then create CounterAdjustments for the Account using that Counter to ensure
+ * the Account is billed according to the number of Counter units the Account subscribes to in a
+ * given billing period.
+ *
+ * See
+ * [Understanding and Creating Counter Adjustments for Accounts](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counter-adjustments-for-accounts)
+ * for more information.
+ */
fun counterAdjustments(): CounterAdjustmentServiceAsync
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterPricing.
+ *
+ * Create the CounterPricing for a Plan/PlanTemplate using a Counter, and define a unit-based
+ * pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Creating Counters and Pricing Plans](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counters)
+ * for more information.
+ */
fun counterPricings(): CounterPricingServiceAsync
+ /**
+ * Endpoints for CreditReason operations such as creation, update, list, and delete.
+ *
+ * You can create CreditReasons for your Organization, and then use them when creating a credit
+ * line item on a bill, or applying a product credit to a bill. CreditReasons provide contextual
+ * information as to why a credit was applied.
+ */
fun creditReasons(): CreditReasonServiceAsync
+ /**
+ * Endpoints for Currency operations such as creation, update, list, and delete. Currencies are
+ * stored for your Organization, and can then be used to specify currencies on various entities
+ * such as plan groups and plan templates.
+ *
+ * **IMPORTANT!** The Currencies you want to use in your Organization must be created first.
+ *
+ * The currency you select for your Organization determines the billing currency and overrides
+ * any currency settings in your pricing Plans. For example, if the Organization currency is set
+ * to USD and a pricing Plan used for an Account is set to GBP, the bill for an Account using
+ * that Plan is calculated in GBP, and then each bill line item converted to USD amounts.
+ *
+ * Currency conversion rates are setup in the *OrganizationConfig*. For more details, see
+ * [Creating and Managing Currencies](https://www.m3ter.com/docs/guides/organization-and-access-management/viewing-and-editing-organization#creating-and-managing-currencies)
+ * in the m3ter Documentation.
+ */
fun currencies(): CurrencyServiceAsync
+ /**
+ * Endpoints for retrieving and updating Custom Fields at the Organization level for all
+ * entities that support them.
+ *
+ * Custom Fields in m3ter allow you to store custom data in the form of number or string values
+ * against m3ter entities in a way that does not directly affect the normal working operation of
+ * the m3ter platform. Having this capability to store data in a free-hand fashion can prove
+ * very useful in helping you to meet specific usage-based pricing and other operational
+ * business use cases.
+ *
+ * However, you can exploit the values stored on Custom Fields in a more direct way by
+ * referencing them in Derived Field and Compound Aggregation calculations. Given the key role
+ * these calculations can play when implementing usage-based pricing schema, any Custom Fields
+ * you reference will then affect how the platform behaves. Referencing Custom Field values in
+ * your calculations offers a much wider scope of options when it comes to resolving complex
+ * usage-based pricing use cases.
+ *
+ * Custom Fields can be added to the following entities at Organizational level:
+ * * Organization
+ * * Account
+ * * AccountPlan
+ * * Aggregation
+ * * Compound Aggregation
+ * * Meter
+ * * Product
+ * * Plan
+ * * PlanTemplate
+ * * Contract
+ *
+ * These all follow the same pattern - a new *(optional)* field is available on the entity
+ * request and response bodies called "customFields" which is a object in this format:
+ * ```
+ * "customFields": {
+ * "exampleCustomField1": 7.1,
+ * "exampleCustomField2": "stringValue"
+ * }
+ * ```
+ *
+ * The value for a Custom Field can be a string or a number.
+ *
+ * **Using Custom Field values in calculations:**
+ * - You can add Custom Fields at two levels - the Organization level and the individual entity
+ * level.
+ * - The Organizational level field provides a default value and *must be added* if you want to
+ * also add a Custom Field of the same name at the corresponding individual entity level. If
+ * you reference the Custom Field in a calculation, the value for the individual entity level
+ * field is used. If no field is defined at individual entity level, then the Organization
+ * level field value is used.
+ *
+ * **Important: Constraints and Exceptions!**
+ *
+ * **Custom Fields at Organization Level**. Currently, you cannot create Custom Fields at the
+ * Organization-level for the following enitites:
+ * * Plan Group
+ * * Balance
+ * * Balance Transaction Schedule
+ * * Balance Charge Schedule
+ *
+ * Therefore you cannot reference the Custom Fields values created at the individual entity
+ * level for these entities in your Derived Field or Compound Aggregation calculations.
+ *
+ * **Derived Field Calculations**. You can *only reference Custom Fields* for the following
+ * entities:
+ * * Organization
+ * * Meter
+ * * Account
+ *
+ * However, if you are using Meters belonging to *a specific Product*, that is, not *Global
+ * Meters*, you can also reference Custom Fields added to a Product in Derived Field
+ * calculations.
+ *
+ * **Compound Aggregation Calculations - Meter Custom Fields**. The value of the *Organization
+ * level Meter Custom Field will always be used*, even if you have defined a corresponding field
+ * at the individual Meter level.
+ *
+ * See
+ * [Working with Custom Fields](https://www.m3ter.com/docs/guides/creating-and-managing-products/working-with-custom-fields)
+ * in the m3ter documentation for more information.
+ */
fun customFields(): CustomFieldServiceAsync
+ /**
+ * Endpoints for triggering one-off, ad-hoc Data Exports. You can set up and run ad-hoc Exports
+ * to export two kinds of data from your m3ter Organization:
+ * * Usage data.
+ * * Operational data for entities.
+ *
+ * **Ad-Hoc Export Destinations** When setting up and running an ad-hoc Export:
+ * * You can define one or more Export Destinations - see the
+ * [ExportDestination](https://www.m3ter.com/docs/api#tag/ExportDestination) section of this
+ * API Reference. When the export runs, the data is sent through to the sepecified
+ * Destination. However, the export file is also made available for you to download it
+ * locally.
+ * * You can set up and run Data Exports without defining a Destination. The data is not
+ * exported but the compiled export file is made available for downloading locally.
+ * * For details on downloading an export file, see the
+ * [Get Data Export File Download URL](https://www.m3ter.com/docs/api#tag/ExportDestination/operation/GenerateDataExportFileDownloadUrl)
+ * endpoint in this API Reference.
+ *
+ * **Preview Version!** The Data Export feature is currently available only in Preview release
+ * version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Preview release definition. ExportAdHoc endpoints will only be available if Data Export
+ * has been enabled for your Organization. For more details see
+ * [Data Export(Preview)](https://www.m3ter.com/docs/guides/data-exports) in our main User
+ * documentation. If you're interested in previewing the Data Export feature, please get in
+ * touch with m3ter Support or your m3ter contact.
+ */
fun dataExports(): DataExportServiceAsync
+ /**
+ * Endpoints for DebitReason operations such as creation, update, list, and delete.
+ *
+ * You can create DebitReasons for your Organization, and then use them when creating a debit
+ * line item on a bill, or applying a product debit to a bill. DebitReasons provide contextual
+ * information as to why a debit was applied.
+ */
fun debitReasons(): DebitReasonServiceAsync
+ /**
+ * This section provides Endpoints for operations that allow you to retrieve detailed
+ * information about individual Events, list all Events or specific Event Types, and explore
+ * dynamic fields available for each Event Type.
+ *
+ * Events encompass specific instances of state changes within the system, such as the creation
+ * of a new Prepayment/Commitment for an Account. Each Event is classified under an Event Type
+ * framework, providing context about what kind of change occurred to generate the Event.
+ *
+ * **Events for Configuration and Billing Entities**
+ *
+ * Many Event Types cover common configuration and billing objects, where the Event is generated
+ * for a state change of one of these objects - for when the configuration or billing object is
+ * **created**, **deleted**, or **updated**.
+ *
+ * For example:
+ * * configuration.commitment.created
+ * * configuration.commitment.deleted
+ * * configuration.commitment.updated
+ * * configuration.account.created
+ * * configuration.account.deleted
+ * * configuration.account.updated
+ * * billing.bill.created
+ * * billing.bill.deleted
+ * * billing.bill.created
+ *
+ * **Events for Errors or Failures**
+ *
+ * There are also Event Types for certain kinds of error that can occur:
+ * * For an Integration:
+ * * validation
+ * * authentication
+ * * perform
+ * * missing account mapping
+ * * disabled
+ * * For a Usage Data Ingest Submission:
+ * * validation failure
+ * * For Data Export Jobs:
+ * * data export job failure
+ *
+ * **Scheduled Events**
+ *
+ * In addition to system-generated Events that occur when a configuration entity undergoes a
+ * state change at creation, update, or deletion of the entity, you can use API calls to create
+ * and configure *Scheduled Event Configurations*. Scheduled Events are custom Event types,
+ * which you can set up by referencing Date/Time fields on configuration and billing entities.
+ * See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference for more details.
+ *
+ * **Notifications for Events**
+ *
+ * You can create Notification rules based on Events and these rules can reference and apply
+ * calculations to the Event's fields. This allows you to set up customized alerts to be sent
+ * out via webhooks when the Event occurs and any conditions you've built into the Notification
+ * rule's calculation are satisfied.
+ *
+ * See the [Notifications](https://www.m3ter.com/docs/api#tag/Notifications) section for more
+ * details.
+ *
+ * **Other Events**
+ *
+ * When Events occur, they can cause other Events, such as when a Notification is triggered by
+ * the Event it is based on. For these Events there are currently two categories:
+ * * Notification
+ * * IntegrationEvent
+ *
+ * Also see
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * and
+ * [Object Definitions and API Calls](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications/object-definitions-and-api-calls)
+ * in the m3ter documentation for more guidance.
+ */
fun events(): EventServiceAsync
+ /**
+ * Endpoints for managing External Mapping related operations such as creation, update, list and
+ * delete.
+ *
+ * When you integrate your 3rd-party systems with the m3ter platform, a mapping between entities
+ * in the local system *(m3ter)* and external systems is constructed. This *External Mapping* is
+ * crucial in scenarios where data from external systems is consumed or where data from the
+ * local system is to be synchronized with external systems.
+ *
+ * When you are working to set up your Integrations and want to test or troubleshoot your
+ * implementation before going live, you might need to create External Mappings manually and, at
+ * a later date, edit or delete them.
+ */
fun externalMappings(): ExternalMappingServiceAsync
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the m3ter
+ * platform. The integration endpoints in this section facilitate various operations such as
+ * creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing, billing
+ * and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
fun integrationConfigurations(): IntegrationConfigurationServiceAsync
+ /**
+ * Endpoints for creating/updating/deleting Lookup Tables.
+ *
+ * Lookup Tables enable you to manage dynamic data mappings that your calculations reference.
+ * Use them for currency conversion, pricing tiers, discount rates, and similar scenarios where
+ * you require values to change operationally but for calculation logic to remain constant.
+ *
+ * **Beta Version!** The Lookup Table feature is currently available in Beta release version.
+ * See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition. Lookup Table endpoints will only be available if Lookup Tables
+ * have been enabled for your Organization. For more details see
+ * [Lookup Tables (Beta)](https://www.m3ter.com/docs/guides/lookup-tables) in our main User
+ * documentation.
+ */
fun lookupTables(): LookupTableServiceAsync
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Meters.
+ *
+ * Use Meters to submit usage data for the consumption of your products and services by end
+ * customers. This usage data then becomes the basis for setting up usage-based pricing for your
+ * products and services.
+ *
+ * Examples of usage data collected in Meters:
+ * * Number of logins.
+ * * Duration of session.
+ * * Amount of data downloaded.
+ *
+ * To collect usage data and ingest it into the platform, you can define two types of fields for
+ * Meters:
+ * - `dataFields` Used to collect raw usage data measures - numeric quantitative data values or
+ * non-numeric point data values.
+ * - `derivedFields` Used to derive usage data measures that are the result of applying a
+ * calculation to `dataFields`, `customFields`, or system `Timestamp` fields.
+ *
+ * You can also:
+ * - Create `customFields` for a Meter, which allows you to attach custom data to the Meter as
+ * name/value pairs.
+ * - Create Global Meters, which are not tied to a specific Product and allow you to collect
+ * usage data that will form the basis of usage-based pricing across multiple Products.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally Identifiable
+ * Information (PII) in m3ter is restricted to a few fields on the **Account** entity. Please
+ * ensure that any fields you configure for Meters, such as Data Fields or Derived Fields, do
+ * not contain any end-customer PII data. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for more
+ * details.
+ *
+ * See also:
+ * - [Reviewing Meter
+ * Options](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/reviewing-meter-options).
+ */
fun meters(): MeterServiceAsync
+ /**
+ * This section provides endpoints for managing Event Notifications.
+ *
+ * You can create Notifications based on system Events generated by the platform. When you base
+ * a Notification on a specific Event type, you can include a calculation that references the
+ * fields available on that Event type to define precise conditions that must be met for the
+ * Notification to be triggered when an Event of that type occurs. In this way, you can set up
+ * highly customized Notifications that act as timely alerts to inform you about significant
+ * occurrences within your Organization. For instance, if you provide a sign-up bonus to new
+ * end-customer Accounts, you can set up a Notification to alert you when an end-customer
+ * Account has used up a certain percentage of their bonus credit.
+ *
+ * You can also set up Notifications based on Scheduled Event types you've created for your
+ * Organization. See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference and
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our user documentation.
+ *
+ * For more details on Event types and their fields, see the
+ * [Events](https://www.m3ter.com/docs/api#tag/Events) section.
+ *
+ * For detailed guidance on working with Events and Notifications, refer to the
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * section of the m3ter user documentation.
+ */
fun notificationConfigurations(): NotificationConfigurationServiceAsync
+ /**
+ * Endpoints for retrieving or updating the Organization Config.
+ *
+ * Organization represents your company as a direct customer of m3ter. Use Organization
+ * configuration to define *Organization-wide* settings. For example:
+ * - Timezone.
+ * - Currencies and currency conversions.
+ * - Billing operations settings, such as:
+ * - Epoch dates to control first billing dates.
+ * - Whether to bill customer accounts in advance/in arrears for standing charge amounts,
+ * minimum spend amounts, and commitment fees.
+ *
+ * For other aspects of your Organization setup and configuration, see the following sections in
+ * this API Reference:
+ * * [Custom Fields](https://www.m3ter.com/docs/api#tag/CustomField)
+ * * [Currencies](https://www.m3ter.com/docs/api#tag/Currency)
+ * * [Credit Reasons](https://www.m3ter.com/docs/api#tag/CreditReason)
+ * * [Debit Reason](https://www.m3ter.com/docs/api#tag/DebitReason)
+ * * [Transaction Types](https://www.m3ter.com/docs/api#tag/TransactionType)
+ *
+ * See also:
+ * - [Managing your
+ * Organization](https://www.m3ter.com/docs/guides/managing-organization-and-users/viewing-and-editing-organization).
+ */
fun organizationConfig(): OrganizationConfigServiceAsync
+ /**
+ * Endpoints for Permission Policy related operations such as creation, update, add and
+ * retrieve.
+ *
+ * Permission Policies can restrict or grant access to specific resources for both Users
+ * *(people)* and Service Users *(automated processes with direct API access)*. This enables you
+ * to control precisely what a User can do in your m3ter Organization.
+ *
+ * For more details, see
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/organization-and-access-management/creating-and-managing-permissions#permission-policy-statements---available-actions-and-resources)
+ * in our main Documentation.
+ */
fun permissionPolicies(): PermissionPolicyServiceAsync
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Plans.
+ *
+ * A Plan is based on a PlanTemplate and represents a specific pricing plan for one of your
+ * products or services. Each Plan inherits general billing attributes or pricing structure from
+ * its parent Plan Template. Some attributes can be overriden for the specific Plan.
+ *
+ * When you've created the Plan Templates and Plans you need for your Products, you can
+ * configure the exact pricing structures for Plans to charge customers that consume one or more
+ * of your Products.
+ *
+ * You can then attach the appropriately priced Plans to customer Accounts to create
+ * [Account Plans](https://www.m3ter.com/docs/api#tag/AccountPlan) and enable charges to be
+ * calculated correctly for billing against those Accounts.
+ *
+ * See also:
+ * - [Reviewing Options for Plans and Plan
+ * Templates](https://www.m3ter.com/docs/guides/working-with-plan-templates-and-plans/reviewing-configuration-options-for-plans-and-plan-templates).
+ */
fun plans(): PlanServiceAsync
+ /**
+ * Endpoints for PlanGroup related operations such as creation, update, retrieve, list and
+ * delete.
+ *
+ * PlanGroups are constructs that group multiple plans together. This enables a unified approach
+ * to efficiently handle various uses cases across different plans. For example applying a
+ * minimum spend amount at billing, across several of your products or features that are each
+ * priced separately.
+ */
fun planGroups(): PlanGroupServiceAsync
+ /**
+ * Endpoints for PlanGroupLink related operations such as creation, update, list and delete.
+ *
+ * PlanGroupLinks are the intersection table between a PlanGroup and its associated Plans. A
+ * PlanGroupLink is only created when at least 1 Plan is linked to a PlanGroup.
+ */
fun planGroupLinks(): PlanGroupLinkServiceAsync
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting PlanTemplates.
+ *
+ * Use PlanTemplates to define default values for Plans. These default values control the
+ * billing operations you want applied to your products. PlanTemplates avoid repetition in
+ * configuration work - many Plans will share settings for billing operations and differ only in
+ * the details of their pricing structures.
+ *
+ * A PlanTemplate is linked to a Product, and each Plan is a child of a PlanTemplate.
+ */
fun planTemplates(): PlanTemplateServiceAsync
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Pricing.
+ *
+ * Create the Pricing for a Plan/PlanTemplate with usage data Aggregations, and define a
+ * usage-based pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Reviewing Pricing Options for Plans and Plan Templates](https://www.m3ter.com/docs/guides/pricing-plans/reviewing-pricing-options-and-pricing-plans)
+ * for more information.
+ */
fun pricings(): PricingServiceAsync
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Products.
+ *
+ * A Product represents the products and services you offer to your end customers. Products act
+ * as a container for the Meters, Aggregations, Pricing, and Plans required to implement
+ * usage-based and other pricing models for your Organization.
+ */
fun products(): ProductServiceAsync
+ /**
+ * Endpoints for ResourceGroup related operations such as creation, update, list and delete.
+ *
+ * ResourceGroups are used in the context of Permission Policies, which controls what a User who
+ * has been given access to your Organization can and cannot do. For example, you might want to
+ * create a Permissions Policy that denies Users the ability to retrieve Meters.
+ *
+ * Resources are defined as m3ter Resource Identifiers *(MRIs)* in the format:
+ * ```
+ * service:resource-type/item-type/id
+ * ```
+ *
+ * Where:
+ * * service is a distinct part of the overall m3ter system, and which forms a natural
+ * functional grouping, such as "config" or "billing".
+ * * resource-type is the resource type item accessed - for example: "Plan", "Meter", "Bill"
+ * * item-type is one of:
+ * * "item" - to specify an individual item.
+ * * "group" - to specify a resource group.
+ * * id is the resource group id or the resource item id
+ *
+ * Resources can be assigned to one or more ResourceGroups. For example, a Plan can be assigned
+ * to Plan ResourceGroups, a Meter can be assigned to Meter ResourceGroups, and so on. This is
+ * useful for cases where you want to create Permission Policies which allow or deny access to a
+ * specific subset of resources. For example, grant a user access to only some of the Plans in
+ * your Organization.
+ *
+ * This concept of grouping resources applies to every resource in m3ter, including
+ * ResourceGroups themselves. This allows you to nest ResourceGroups to support hierarchies of
+ * groups.
+ *
+ * See
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/managing-organization-and-users/creating-and-managing-permissions)
+ * in the m3ter documentation for more information.
+ *
+ * **Note: User Resource Groups** You can create a User Resource Group to group resources of
+ * type = `user`. You can then retrieve a list of the User Resource Groups a user belongs to.
+ * For more details, see the
+ * [Retrieve OrgUser Groups](https://www.m3ter.com/docs/api#tag/OrgUsers/operation/GetOrgUserGroups)
+ * call in the OrgUsers section.
+ */
fun resourceGroups(): ResourceGroupServiceAsync
+ /**
+ * Endpoints for retrieving and managing scheduled Events' configurations.
+ *
+ * Scheduled Event Configurations define custom Event types that reference Date/Time fields
+ * belonging to configuration and billing entities. They therefore provide you with an extra
+ * degree of flexibility over and above system-generated Events for setting up Notifications
+ * based on Events.
+ *
+ * For more details, see the
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our Documenation.
+ */
fun scheduledEventConfigurations(): ScheduledEventConfigurationServiceAsync
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights into
+ * the consumption patterns and charges of your end-customer Accounts.
+ */
fun statements(): StatementServiceAsync
+ /**
+ * Endpoints for TransactionType operations such as creation, update, list, retrieve, and
+ * delete.
+ *
+ * You can create TransactionTypes for your Organization, which can then be used when creating
+ * and updating Balances. Example TransactionTypes: "Balance Amount" or "Add Funds".
+ *
+ * For details on creating a Transaction amount for a Balance using a TransactionType you've
+ * created for your Organization, see the
+ * [Create Balance Transaction](https://www.m3ter.com/docs/api#tag/Balances/operation/PostBalanceTransaction)
+ * call in the [Balances](https://www.m3ter.com/docs/api#tag/Balances) section of this API
+ * Reference.
+ */
fun transactionTypes(): TransactionTypeServiceAsync
fun usage(): UsageServiceAsync
fun users(): UserServiceAsync
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the m3ter
+ * platform. The integration endpoints in this section facilitate various operations such as
+ * creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing, billing
+ * and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
fun webhooks(): WebhookServiceAsync
/**
@@ -187,86 +1038,945 @@ interface M3terClientAsync {
*/
fun withOptions(modifier: Consumer): M3terClientAsync.WithRawResponse
+ /**
+ * Endpoint for retrieving a JSON Web Token (JWT) bearer token for a ServiceUser using the
+ * Client Credentials Grant flow.
+ *
+ * A ServiceUser represents the automated process you want to grant access to your
+ * Organization - that is, as an API user.
+ */
fun authentication(): AuthenticationServiceAsync.WithRawResponse
+ /**
+ * Endpoints for Account related operations such as creation, update, list and delete. An
+ * Account represents one of your end-customer accounts.
+ *
+ * Accounts do not belong to a Product to allow for cases where an end customer takes more
+ * than one of your Products, and the charges for these Products differ.
+ *
+ * You typically attach a priced Plan or Plan Template to an Account before you can generate
+ * bills for the Account:
+ * - If a customer consumes several of your Products, you can attach a priced Plan or Plan
+ * Template to the Account for charging against each Product.
+ * - If an Account is charged solely on the basis of an agreed Prepayment/Commitment amount
+ * but not all of the Prepayment is prepaid, you can use a customized billing schedule for
+ * outstanding fees without having to attach a Plan to the Account to generate Bills.
+ *
+ * You can create Child Accounts for end customers who hold multiple Accounts with you. You
+ * can then set up billing for the Parent/Child Account usage to have the end-customer
+ * billed once for the Parent Account, instead of having separate bills issued for usage
+ * against each of their multiple Accounts.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally
+ * Identifiable Information (PII) in m3ter is restricted to a few fields on the **Account**
+ * entity. Please ensure that only the ``name``, ``address``, or ``emailAddress`` fields
+ * contain any end-customer PII data on any Accounts you create. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for
+ * more details.
+ */
fun accounts(): AccountServiceAsync.WithRawResponse
+ /**
+ * Endpoints for AccountPlan and AccountPlanGroup related operations such as creation,
+ * update, list and delete.
+ *
+ * **AccountPlans** An Account represents one of your end-customer accounts. To create an
+ * AccountPlan, you attach a Product Plan to an Account. The AccountPlan then determines the
+ * charges incurred at billing by your end customer for consuming the Product the Plan is
+ * for:
+ * * **AccountPlan Active/Inactive**. Set start and end dates to define the period the
+ * AccountPlan is active for the Account.
+ * * **AccountPlan per Product**. If an end customer consumes multiple Products, create
+ * separate AccountPlans to charge for each Product.
+ *
+ * **AccountPlan Constraints:**
+ * * Only one AccountPlan per Product can be active at any one time for an Account.
+ * * If you create a Plan as a custom Plan for a specific Account, you can only use it to
+ * create an AccountPlan for that Account.
+ *
+ * **AccountPlanGroups** Plan Groups are used when you want to apply a minimum spend amount
+ * at billing across several of your Products each of which are priced separately - when you
+ * create the Plan Group, you define an overall minimum spend and then add any priced Plans
+ * you want to include in the Group. To create an AccounPlanGroup, you can attach a Plan
+ * Group to an Account that consumes the separate Products which are priced using the
+ * included Plans. At billing, the minimum spend you've defined for the Plan Group is
+ * applied:
+ * * **Active AccountPlanGroup**. Set the start and end dates to define the period for which
+ * the Plan Group will be active for the Account.
+ *
+ * **Plan Group Notes:**
+ * * You can only add *one Plan for the same Product* to a Plan Group. See the
+ * [Plan Group](https://www.m3ter.com/docs/api#tag/PlanGroup) in this API Reference for
+ * more details on creating Plan Groups.
+ * * You can create a *custom Plan Group* for an Account, which means the Plan Group can
+ * only be attached to that Account to create an AccountPlanGroup.
+ *
+ * **AcountPlanGroup - Notes and Constraints:**
+ * * **AccountPlanGroup is type of AccountPlan** When you attach a Plan Group to an Account,
+ * this creates an AccountPlanGroup. However, the m3ter data model *does not support a
+ * separate AccountPlanGroup entity*, and an AccountPlanGroup is a type of AccountPlan
+ * where a `planGroupId` is used instead of a `planId` when it's created. See the
+ * [Create AccountPlan](https://www.m3ter.com/docs/api#tag/AccountPlan/operation/PostAccountPlan)
+ * call in this section and
+ * [Attaching Plan Groups to an Account](https://www.m3ter.com/docs/guides/end-customer-accounts/attaching-plan-groups-to-an-account)
+ * in our main User Documentation.
+ * * **Multiple AccountPlan Groups:** You can attach more than one Plan Group to an Account
+ * to create multiple AccountPlanGroups, but the rule that *only one attached Plan per
+ * Product can be active at any one time for an Account* is preserved:
+ * * Multiple attached Plan Groups on an Account can have overlapping dates only if none
+ * of the Plan Groups contain a Plan belonging to the same Product. If you try to
+ * attach a Plan Group to an Account with Plan Groups already attached and:
+ * * The new Plan Group contains a Product Plan that also belongs to a Plan Group
+ * already attached to the Account.
+ * * The dates for these "matched Plan" Plan Groups being active for the Account
+ * would overlap.
+ * * Then you'll receive an error and the attachment will be blocked.
+ */
fun accountPlans(): AccountPlanServiceAsync.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Aggregations.
+ *
+ * An Aggregation links to a Meter and targets a Data Field or Derived Field on the Meter.
+ * You define the method of aggregation used to convert the usage data collected by the
+ * targeted Meter field into a numerical unit of measurement.
+ *
+ * You can then use the unit of measurement an Aggregation yields as a metric for pricing
+ * Product Plans and apply usage-based pricing to your products and services. You might also
+ * want to aggregate raw data measures for other purposes, such as to feed into analytical
+ * or business performance tools.
+ *
+ * **Notes:**
+ * * **Contrast with Compound Aggregations**. Standard or simple Aggregations of this type,
+ * which apply an aggregation method directly to Meter usage data fields, are contrasted
+ * with [Compound Aggregations](https://www.m3ter.com/docs/api#tag/CompoundAggregation). A
+ * Compound Aggregation typically references one or more simple Aggregations and applies a
+ * calculation to them to derive pricing metrics needed to serve more complex usage-based
+ * pricing scenarios.
+ * * **Segmented Aggregations**. Segmented Aggregations allow you to segment the usage data
+ * collected by a single Meter. This capability is very useful for implementing some
+ * pricing and billing use cases. See
+ * [Segmented Aggregations](https://www.m3ter.com/docs/guides/usage-data-aggregations/segmented-aggregations)
+ * in our main documentation for more details.
+ */
fun aggregations(): AggregationServiceAsync.WithRawResponse
+ /**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative
+ * Transaction amounts for the Balance. To do this, you must first define Transaction Types
+ * for your Organization, and then use one of these Transaction Types when you add a
+ * specific Transaction to a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their
+ * Account, which can then be draw-down against charges due for product or service
+ * consumption. You can include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an
+ * initial free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This
+ * acts as an initial commitment, which allows them to use the service and gain an
+ * accurate insight into their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to
+ * subsequent Bills as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have
+ * agreed to pay for consuming your product or services across a full contract term. A
+ * customer might pay the entire or only part of the agreed amount upfront, but ***the
+ * commitment or prepayment amount is payable regardless of the actual usage by the customer
+ * of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used
+ * when a customer wants to add a credit amount to their Account at any time during the
+ * service period or when you as service provider want to add a credit to a customer
+ * Account. This Balance credit can then be drawn-down against for billing the Account for
+ * usage, minimum spend, standing charges, or recurring charges due. Balances therefore
+ * serve payment use cases in a more flexible way, for example to be used for a "Free
+ * Credit" sign-up scheme you offer to encourage sales or to enhance customer satisfaction
+ * by adding credit to an Account to compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Commitment credit
+ * on an Account is drawn-down - Balance amounts first or Commitment/Prepayment amounts
+ * first.
+ */
fun balances(): BalanceServiceAsync.WithRawResponse
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights
+ * into the consumption patterns and charges of your end-customer Accounts.
+ */
fun bills(): BillServiceAsync.WithRawResponse
+ /**
+ * Endpoints for updating and retreiving the Bill Configuration for an Organization. The
+ * Organization represents your company as a direct customer of the m3ter service.
+ *
+ * You can use the **Update BillConfig** endpoint to set a global lock date for **all**
+ * Bills - any Bill with a service period end date on or before the set date will be locked
+ * and cannot be updated.
+ *
+ * **Warning: Ensure all Bills are Approved!** If you try to set a global lock date when
+ * there remains Bills in a *Pending* state whose service period end date is on or before
+ * the specified lock date, then you'll receive an error.
+ */
fun billConfig(): BillConfigServiceAsync.WithRawResponse
+ /**
+ * Endpoints that manage Commitments *(also known as Prepayments)* in the context of
+ * usage-based pricing and billing. A Commitment represents an agreement where the
+ * end-customer has agreed to pay a fixed minimum amount throughout the contract period.
+ * ***The commitment amount is payable regardless of the actual usage by the customer of
+ * your service or product.***
+ *
+ * These endpoints enable the creation, updating, retrieval, and deletion of Commitments.
+ * Use them to manage your customer's Commitments and ensure optimal revenue recognition:
+ * * Specify which type of charges can draw-down against a Commitment amount on an Account
+ * at billing: usage, minimum spend, standing charges, or recurring charges.
+ * * Define overage surcharge percentages, which are applied when the usage charges exceed
+ * the agreed Commitment amount within the contract duration.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments/Prepayments are used for amounts end-customers have agreed to pay for
+ * consuming your product or services across a full contract term. A customer might pay the
+ * entire or only part of the agreed amount upfront, but ***the prepayment amount is payable
+ * regardless of the actual usage by the customer of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used
+ * when a customer wants to add a credit amount to their Account at any time during the
+ * service period or when you as service provider want to add a credit to a customer
+ * Account. This Balance credit can then be drawn-down against for billing the Account for
+ * usage, minimum spend, standing charges, or recurring charges due. Balances therefore
+ * serve payment use cases in a more flexible way, for example to be used for a "Free
+ * Credit" sign-up scheme you offer to encourage sales or to enhance customer satisfaction
+ * by adding credit to an Account to compensate for service delivery issues.
+ *
+ * You can use Prepayments/Commitments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Prepayment credit
+ * on an Account is drawn-down - Balance amounts first or Prepayment amounts first.
+ *
+ * #### Billing for Commitments
+ *
+ * If not all of an agreed Commitment amount is paid at the start of an end-customer
+ * contract period, you can choose one of two options for billing the outstanding fees due
+ * on the customer Account:
+ * - Select a Product *Plan to bill with*.
+ * - Define a *schedule of billing dates*.
+ */
fun commitments(): CommitmentServiceAsync.WithRawResponse
+ /**
+ * Endpoints for creating, retrieving, listing, and cancelling Bill Jobs.
+ *
+ * Bill Jobs are critical components in billing management, providing asynchronous
+ * mechanisms to calculate and handle bills.
+ *
+ * Bill Jobs give you the flexibiity to run Bills manually for Accounts to suit different
+ * billing management purposes. For example, some historical usage data has come in for an
+ * Account and you want to run a Bill for a specific date on that Account to check that the
+ * Bill is showing correctly for the charges due on the new usage data.
+ */
fun billJobs(): BillJobServiceAsync.WithRawResponse
+ /**
+ * Endpoints for creating/updating/deleting Charges.
+ *
+ * Create Charges for your end-customer Accounts to create ad-hoc line items for Account
+ * billing. Charges are:
+ * * Created for either debit or credit amounts.
+ * * Linked to a Product for accounting purposes.
+ * * Optionally linked to a Contract.
+ * * Given a specific date for billing. When a bill job has run for the specified Charge
+ * bill date, a Charge appears as an Ad-hoc line item on the Bill.
+ * * Assigned a service period.
+ * * Available in any currency defined for your Organization. See
+ * [Creating Charges for Accounts](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-charges-for-accounts)
+ * in our main user documentation for more details.
+ *
+ * Alternatively, you can create a Charge for a Balance on an end-customer Account to create
+ * balance fee line items for Account billing. See
+ * [Creating Charges for Balances](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-balances-for-accounts/creating-charges-for-balances)
+ * in our main user documentation for more details.
+ */
fun charges(): ChargeServiceAsync.WithRawResponse
+ /**
+ * Endpoints for Compound Aggregation related operations such as creation, update, list and
+ * delete.
+ *
+ * Use Compound Aggregations to create numerical measures from usage data by applying a
+ * calculation to one or more simple Aggregations or Custom Fields. These numerical measures
+ * can then be used as pricing metrics to price your Product Plans, enabling you to
+ * implement a wide range of usage-based pricing use cases.
+ *
+ * You can create two types of Compound Aggregation:
+ *
+ * **Global**
+ * - Pricing: Not tied to any specific product and can be used to price Plans belonging to
+ * any Product.
+ * - Calculation: can reference all simple Aggregations - both Global simple Aggregations
+ * and any product-specific simple Aggregations.
+ *
+ * **Product-specific**
+ * - Pricing: belong to a specific Product and can only be used to price Plans belonging to
+ * the same Product.
+ * - Calculation: can reference any simple Aggregations belonging to the same Product and
+ * any Global simple Aggregations.
+ *
+ * **IMPORTANT!** If a simple Aggregation referenced by a Compound Aggregation has a
+ * **Quantity per unit** defined or a **Rounding** defined, these will not be factored into
+ * the value used by the calculation. For example, if the simple Aggregation referenced has
+ * a base value of 100 and has **Quantity per unit** set at 10, the Compound Aggregation
+ * calculation *will use the base value of 100 not 10*.
+ *
+ * To better understand and use Compound Aggregations, refer to the example
+ * [Compound Aggregation Use Case](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/compound-aggregations#example-use-case)
+ * in the m3ter documentation.
+ */
fun compoundAggregations(): CompoundAggregationServiceAsync.WithRawResponse
+ /**
+ * Endpoints for Contract related operations such as creation, update, list and delete.
+ *
+ * Contracts are created for Accounts, which are your end-user customers. Contracts can be
+ * used for:
+ * * **Accounts Reporting**. To serve your general accounting operations and processes, you
+ * can report on total Contract values for an Account.
+ * * **Contract Billing**. Various billing entities associated with an Account can be linked
+ * to Contracts on the Account to meet your specific Contract billing use cases.
+ */
fun contracts(): ContractServiceAsync.WithRawResponse
+ /**
+ * Endpoints for listing, creating, retrieving, updating, or deleting Counters.
+ *
+ * You can create Counters for your m3ter Organization, which can then be used as pricing
+ * metrics to apply a unit-based
+ * [CounterPricing](https://www.m3ter.com/docs/api#tag/CounterPricing) to Product Plans or
+ * Plan Templates for recurring subscription charges on Accounts.
+ *
+ * Counters can then be used to post
+ * [CounterAdjustments](https://www.m3ter.com/docs/api#tag/CounterAdjustments) on your
+ * end-customer Accounts.
+ *
+ * Accounts are then billed in accordance with the CounterPricing on Plans attached to the
+ * Accounts and for the actual Counter quantities Accounts subscribe to. See
+ * [Recurring Charges: Counters](https://www.m3ter.com/docs/guides/recurring-charges-counters)
+ * in our main user documentation for more details.
+ */
fun counters(): CounterServiceAsync.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterAdjustments.
+ *
+ * If you attach a Plan to an Account which is priced using a Counter to apply unit-based
+ * pricing, you can then create CounterAdjustments for the Account using that Counter to
+ * ensure the Account is billed according to the number of Counter units the Account
+ * subscribes to in a given billing period.
+ *
+ * See
+ * [Understanding and Creating Counter Adjustments for Accounts](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counter-adjustments-for-accounts)
+ * for more information.
+ */
fun counterAdjustments(): CounterAdjustmentServiceAsync.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterPricing.
+ *
+ * Create the CounterPricing for a Plan/PlanTemplate using a Counter, and define a
+ * unit-based pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Creating Counters and Pricing Plans](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counters)
+ * for more information.
+ */
fun counterPricings(): CounterPricingServiceAsync.WithRawResponse
+ /**
+ * Endpoints for CreditReason operations such as creation, update, list, and delete.
+ *
+ * You can create CreditReasons for your Organization, and then use them when creating a
+ * credit line item on a bill, or applying a product credit to a bill. CreditReasons provide
+ * contextual information as to why a credit was applied.
+ */
fun creditReasons(): CreditReasonServiceAsync.WithRawResponse
+ /**
+ * Endpoints for Currency operations such as creation, update, list, and delete. Currencies
+ * are stored for your Organization, and can then be used to specify currencies on various
+ * entities such as plan groups and plan templates.
+ *
+ * **IMPORTANT!** The Currencies you want to use in your Organization must be created first.
+ *
+ * The currency you select for your Organization determines the billing currency and
+ * overrides any currency settings in your pricing Plans. For example, if the Organization
+ * currency is set to USD and a pricing Plan used for an Account is set to GBP, the bill for
+ * an Account using that Plan is calculated in GBP, and then each bill line item converted
+ * to USD amounts.
+ *
+ * Currency conversion rates are setup in the *OrganizationConfig*. For more details, see
+ * [Creating and Managing Currencies](https://www.m3ter.com/docs/guides/organization-and-access-management/viewing-and-editing-organization#creating-and-managing-currencies)
+ * in the m3ter Documentation.
+ */
fun currencies(): CurrencyServiceAsync.WithRawResponse
+ /**
+ * Endpoints for retrieving and updating Custom Fields at the Organization level for all
+ * entities that support them.
+ *
+ * Custom Fields in m3ter allow you to store custom data in the form of number or string
+ * values against m3ter entities in a way that does not directly affect the normal working
+ * operation of the m3ter platform. Having this capability to store data in a free-hand
+ * fashion can prove very useful in helping you to meet specific usage-based pricing and
+ * other operational business use cases.
+ *
+ * However, you can exploit the values stored on Custom Fields in a more direct way by
+ * referencing them in Derived Field and Compound Aggregation calculations. Given the key
+ * role these calculations can play when implementing usage-based pricing schema, any Custom
+ * Fields you reference will then affect how the platform behaves. Referencing Custom Field
+ * values in your calculations offers a much wider scope of options when it comes to
+ * resolving complex usage-based pricing use cases.
+ *
+ * Custom Fields can be added to the following entities at Organizational level:
+ * * Organization
+ * * Account
+ * * AccountPlan
+ * * Aggregation
+ * * Compound Aggregation
+ * * Meter
+ * * Product
+ * * Plan
+ * * PlanTemplate
+ * * Contract
+ *
+ * These all follow the same pattern - a new *(optional)* field is available on the entity
+ * request and response bodies called "customFields" which is a object in this format:
+ * ```
+ * "customFields": {
+ * "exampleCustomField1": 7.1,
+ * "exampleCustomField2": "stringValue"
+ * }
+ * ```
+ *
+ * The value for a Custom Field can be a string or a number.
+ *
+ * **Using Custom Field values in calculations:**
+ * - You can add Custom Fields at two levels - the Organization level and the individual
+ * entity level.
+ * - The Organizational level field provides a default value and *must be added* if you want
+ * to also add a Custom Field of the same name at the corresponding individual entity
+ * level. If you reference the Custom Field in a calculation, the value for the individual
+ * entity level field is used. If no field is defined at individual entity level, then the
+ * Organization level field value is used.
+ *
+ * **Important: Constraints and Exceptions!**
+ *
+ * **Custom Fields at Organization Level**. Currently, you cannot create Custom Fields at
+ * the Organization-level for the following enitites:
+ * * Plan Group
+ * * Balance
+ * * Balance Transaction Schedule
+ * * Balance Charge Schedule
+ *
+ * Therefore you cannot reference the Custom Fields values created at the individual entity
+ * level for these entities in your Derived Field or Compound Aggregation calculations.
+ *
+ * **Derived Field Calculations**. You can *only reference Custom Fields* for the following
+ * entities:
+ * * Organization
+ * * Meter
+ * * Account
+ *
+ * However, if you are using Meters belonging to *a specific Product*, that is, not *Global
+ * Meters*, you can also reference Custom Fields added to a Product in Derived Field
+ * calculations.
+ *
+ * **Compound Aggregation Calculations - Meter Custom Fields**. The value of the
+ * *Organization level Meter Custom Field will always be used*, even if you have defined a
+ * corresponding field at the individual Meter level.
+ *
+ * See
+ * [Working with Custom Fields](https://www.m3ter.com/docs/guides/creating-and-managing-products/working-with-custom-fields)
+ * in the m3ter documentation for more information.
+ */
fun customFields(): CustomFieldServiceAsync.WithRawResponse
+ /**
+ * Endpoints for triggering one-off, ad-hoc Data Exports. You can set up and run ad-hoc
+ * Exports to export two kinds of data from your m3ter Organization:
+ * * Usage data.
+ * * Operational data for entities.
+ *
+ * **Ad-Hoc Export Destinations** When setting up and running an ad-hoc Export:
+ * * You can define one or more Export Destinations - see the
+ * [ExportDestination](https://www.m3ter.com/docs/api#tag/ExportDestination) section of
+ * this API Reference. When the export runs, the data is sent through to the sepecified
+ * Destination. However, the export file is also made available for you to download it
+ * locally.
+ * * You can set up and run Data Exports without defining a Destination. The data is not
+ * exported but the compiled export file is made available for downloading locally.
+ * * For details on downloading an export file, see the
+ * [Get Data Export File Download URL](https://www.m3ter.com/docs/api#tag/ExportDestination/operation/GenerateDataExportFileDownloadUrl)
+ * endpoint in this API Reference.
+ *
+ * **Preview Version!** The Data Export feature is currently available only in Preview
+ * release version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Preview release definition. ExportAdHoc endpoints will only be available if Data
+ * Export has been enabled for your Organization. For more details see
+ * [Data Export(Preview)](https://www.m3ter.com/docs/guides/data-exports) in our main User
+ * documentation. If you're interested in previewing the Data Export feature, please get in
+ * touch with m3ter Support or your m3ter contact.
+ */
fun dataExports(): DataExportServiceAsync.WithRawResponse
+ /**
+ * Endpoints for DebitReason operations such as creation, update, list, and delete.
+ *
+ * You can create DebitReasons for your Organization, and then use them when creating a
+ * debit line item on a bill, or applying a product debit to a bill. DebitReasons provide
+ * contextual information as to why a debit was applied.
+ */
fun debitReasons(): DebitReasonServiceAsync.WithRawResponse
+ /**
+ * This section provides Endpoints for operations that allow you to retrieve detailed
+ * information about individual Events, list all Events or specific Event Types, and explore
+ * dynamic fields available for each Event Type.
+ *
+ * Events encompass specific instances of state changes within the system, such as the
+ * creation of a new Prepayment/Commitment for an Account. Each Event is classified under an
+ * Event Type framework, providing context about what kind of change occurred to generate
+ * the Event.
+ *
+ * **Events for Configuration and Billing Entities**
+ *
+ * Many Event Types cover common configuration and billing objects, where the Event is
+ * generated for a state change of one of these objects - for when the configuration or
+ * billing object is **created**, **deleted**, or **updated**.
+ *
+ * For example:
+ * * configuration.commitment.created
+ * * configuration.commitment.deleted
+ * * configuration.commitment.updated
+ * * configuration.account.created
+ * * configuration.account.deleted
+ * * configuration.account.updated
+ * * billing.bill.created
+ * * billing.bill.deleted
+ * * billing.bill.created
+ *
+ * **Events for Errors or Failures**
+ *
+ * There are also Event Types for certain kinds of error that can occur:
+ * * For an Integration:
+ * * validation
+ * * authentication
+ * * perform
+ * * missing account mapping
+ * * disabled
+ * * For a Usage Data Ingest Submission:
+ * * validation failure
+ * * For Data Export Jobs:
+ * * data export job failure
+ *
+ * **Scheduled Events**
+ *
+ * In addition to system-generated Events that occur when a configuration entity undergoes a
+ * state change at creation, update, or deletion of the entity, you can use API calls to
+ * create and configure *Scheduled Event Configurations*. Scheduled Events are custom Event
+ * types, which you can set up by referencing Date/Time fields on configuration and billing
+ * entities. See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference for more details.
+ *
+ * **Notifications for Events**
+ *
+ * You can create Notification rules based on Events and these rules can reference and apply
+ * calculations to the Event's fields. This allows you to set up customized alerts to be
+ * sent out via webhooks when the Event occurs and any conditions you've built into the
+ * Notification rule's calculation are satisfied.
+ *
+ * See the [Notifications](https://www.m3ter.com/docs/api#tag/Notifications) section for
+ * more details.
+ *
+ * **Other Events**
+ *
+ * When Events occur, they can cause other Events, such as when a Notification is triggered
+ * by the Event it is based on. For these Events there are currently two categories:
+ * * Notification
+ * * IntegrationEvent
+ *
+ * Also see
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * and
+ * [Object Definitions and API Calls](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications/object-definitions-and-api-calls)
+ * in the m3ter documentation for more guidance.
+ */
fun events(): EventServiceAsync.WithRawResponse
+ /**
+ * Endpoints for managing External Mapping related operations such as creation, update, list
+ * and delete.
+ *
+ * When you integrate your 3rd-party systems with the m3ter platform, a mapping between
+ * entities in the local system *(m3ter)* and external systems is constructed. This
+ * *External Mapping* is crucial in scenarios where data from external systems is consumed
+ * or where data from the local system is to be synchronized with external systems.
+ *
+ * When you are working to set up your Integrations and want to test or troubleshoot your
+ * implementation before going live, you might need to create External Mappings manually
+ * and, at a later date, edit or delete them.
+ */
fun externalMappings(): ExternalMappingServiceAsync.WithRawResponse
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the
+ * m3ter platform. The integration endpoints in this section facilitate various operations
+ * such as creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing,
+ * billing and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
fun integrationConfigurations(): IntegrationConfigurationServiceAsync.WithRawResponse
+ /**
+ * Endpoints for creating/updating/deleting Lookup Tables.
+ *
+ * Lookup Tables enable you to manage dynamic data mappings that your calculations
+ * reference. Use them for currency conversion, pricing tiers, discount rates, and similar
+ * scenarios where you require values to change operationally but for calculation logic to
+ * remain constant.
+ *
+ * **Beta Version!** The Lookup Table feature is currently available in Beta release
+ * version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition. Lookup Table endpoints will only be available if Lookup
+ * Tables have been enabled for your Organization. For more details see
+ * [Lookup Tables (Beta)](https://www.m3ter.com/docs/guides/lookup-tables) in our main User
+ * documentation.
+ */
fun lookupTables(): LookupTableServiceAsync.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Meters.
+ *
+ * Use Meters to submit usage data for the consumption of your products and services by end
+ * customers. This usage data then becomes the basis for setting up usage-based pricing for
+ * your products and services.
+ *
+ * Examples of usage data collected in Meters:
+ * * Number of logins.
+ * * Duration of session.
+ * * Amount of data downloaded.
+ *
+ * To collect usage data and ingest it into the platform, you can define two types of fields
+ * for Meters:
+ * - `dataFields` Used to collect raw usage data measures - numeric quantitative data values
+ * or non-numeric point data values.
+ * - `derivedFields` Used to derive usage data measures that are the result of applying a
+ * calculation to `dataFields`, `customFields`, or system `Timestamp` fields.
+ *
+ * You can also:
+ * - Create `customFields` for a Meter, which allows you to attach custom data to the Meter
+ * as name/value pairs.
+ * - Create Global Meters, which are not tied to a specific Product and allow you to collect
+ * usage data that will form the basis of usage-based pricing across multiple Products.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally
+ * Identifiable Information (PII) in m3ter is restricted to a few fields on the **Account**
+ * entity. Please ensure that any fields you configure for Meters, such as Data Fields or
+ * Derived Fields, do not contain any end-customer PII data. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for
+ * more details.
+ *
+ * See also:
+ * - [Reviewing Meter
+ * Options](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/reviewing-meter-options).
+ */
fun meters(): MeterServiceAsync.WithRawResponse
+ /**
+ * This section provides endpoints for managing Event Notifications.
+ *
+ * You can create Notifications based on system Events generated by the platform. When you
+ * base a Notification on a specific Event type, you can include a calculation that
+ * references the fields available on that Event type to define precise conditions that must
+ * be met for the Notification to be triggered when an Event of that type occurs. In this
+ * way, you can set up highly customized Notifications that act as timely alerts to inform
+ * you about significant occurrences within your Organization. For instance, if you provide
+ * a sign-up bonus to new end-customer Accounts, you can set up a Notification to alert you
+ * when an end-customer Account has used up a certain percentage of their bonus credit.
+ *
+ * You can also set up Notifications based on Scheduled Event types you've created for your
+ * Organization. See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference and
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our user documentation.
+ *
+ * For more details on Event types and their fields, see the
+ * [Events](https://www.m3ter.com/docs/api#tag/Events) section.
+ *
+ * For detailed guidance on working with Events and Notifications, refer to the
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * section of the m3ter user documentation.
+ */
fun notificationConfigurations(): NotificationConfigurationServiceAsync.WithRawResponse
+ /**
+ * Endpoints for retrieving or updating the Organization Config.
+ *
+ * Organization represents your company as a direct customer of m3ter. Use Organization
+ * configuration to define *Organization-wide* settings. For example:
+ * - Timezone.
+ * - Currencies and currency conversions.
+ * - Billing operations settings, such as:
+ * - Epoch dates to control first billing dates.
+ * - Whether to bill customer accounts in advance/in arrears for standing charge
+ * amounts, minimum spend amounts, and commitment fees.
+ *
+ * For other aspects of your Organization setup and configuration, see the following
+ * sections in this API Reference:
+ * * [Custom Fields](https://www.m3ter.com/docs/api#tag/CustomField)
+ * * [Currencies](https://www.m3ter.com/docs/api#tag/Currency)
+ * * [Credit Reasons](https://www.m3ter.com/docs/api#tag/CreditReason)
+ * * [Debit Reason](https://www.m3ter.com/docs/api#tag/DebitReason)
+ * * [Transaction Types](https://www.m3ter.com/docs/api#tag/TransactionType)
+ *
+ * See also:
+ * - [Managing your
+ * Organization](https://www.m3ter.com/docs/guides/managing-organization-and-users/viewing-and-editing-organization).
+ */
fun organizationConfig(): OrganizationConfigServiceAsync.WithRawResponse
+ /**
+ * Endpoints for Permission Policy related operations such as creation, update, add and
+ * retrieve.
+ *
+ * Permission Policies can restrict or grant access to specific resources for both Users
+ * *(people)* and Service Users *(automated processes with direct API access)*. This enables
+ * you to control precisely what a User can do in your m3ter Organization.
+ *
+ * For more details, see
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/organization-and-access-management/creating-and-managing-permissions#permission-policy-statements---available-actions-and-resources)
+ * in our main Documentation.
+ */
fun permissionPolicies(): PermissionPolicyServiceAsync.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Plans.
+ *
+ * A Plan is based on a PlanTemplate and represents a specific pricing plan for one of your
+ * products or services. Each Plan inherits general billing attributes or pricing structure
+ * from its parent Plan Template. Some attributes can be overriden for the specific Plan.
+ *
+ * When you've created the Plan Templates and Plans you need for your Products, you can
+ * configure the exact pricing structures for Plans to charge customers that consume one or
+ * more of your Products.
+ *
+ * You can then attach the appropriately priced Plans to customer Accounts to create
+ * [Account Plans](https://www.m3ter.com/docs/api#tag/AccountPlan) and enable charges to be
+ * calculated correctly for billing against those Accounts.
+ *
+ * See also:
+ * - [Reviewing Options for Plans and Plan
+ * Templates](https://www.m3ter.com/docs/guides/working-with-plan-templates-and-plans/reviewing-configuration-options-for-plans-and-plan-templates).
+ */
fun plans(): PlanServiceAsync.WithRawResponse
+ /**
+ * Endpoints for PlanGroup related operations such as creation, update, retrieve, list and
+ * delete.
+ *
+ * PlanGroups are constructs that group multiple plans together. This enables a unified
+ * approach to efficiently handle various uses cases across different plans. For example
+ * applying a minimum spend amount at billing, across several of your products or features
+ * that are each priced separately.
+ */
fun planGroups(): PlanGroupServiceAsync.WithRawResponse
+ /**
+ * Endpoints for PlanGroupLink related operations such as creation, update, list and delete.
+ *
+ * PlanGroupLinks are the intersection table between a PlanGroup and its associated Plans. A
+ * PlanGroupLink is only created when at least 1 Plan is linked to a PlanGroup.
+ */
fun planGroupLinks(): PlanGroupLinkServiceAsync.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting PlanTemplates.
+ *
+ * Use PlanTemplates to define default values for Plans. These default values control the
+ * billing operations you want applied to your products. PlanTemplates avoid repetition in
+ * configuration work - many Plans will share settings for billing operations and differ
+ * only in the details of their pricing structures.
+ *
+ * A PlanTemplate is linked to a Product, and each Plan is a child of a PlanTemplate.
+ */
fun planTemplates(): PlanTemplateServiceAsync.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Pricing.
+ *
+ * Create the Pricing for a Plan/PlanTemplate with usage data Aggregations, and define a
+ * usage-based pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Reviewing Pricing Options for Plans and Plan Templates](https://www.m3ter.com/docs/guides/pricing-plans/reviewing-pricing-options-and-pricing-plans)
+ * for more information.
+ */
fun pricings(): PricingServiceAsync.WithRawResponse
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Products.
+ *
+ * A Product represents the products and services you offer to your end customers. Products
+ * act as a container for the Meters, Aggregations, Pricing, and Plans required to implement
+ * usage-based and other pricing models for your Organization.
+ */
fun products(): ProductServiceAsync.WithRawResponse
+ /**
+ * Endpoints for ResourceGroup related operations such as creation, update, list and delete.
+ *
+ * ResourceGroups are used in the context of Permission Policies, which controls what a User
+ * who has been given access to your Organization can and cannot do. For example, you might
+ * want to create a Permissions Policy that denies Users the ability to retrieve Meters.
+ *
+ * Resources are defined as m3ter Resource Identifiers *(MRIs)* in the format:
+ * ```
+ * service:resource-type/item-type/id
+ * ```
+ *
+ * Where:
+ * * service is a distinct part of the overall m3ter system, and which forms a natural
+ * functional grouping, such as "config" or "billing".
+ * * resource-type is the resource type item accessed - for example: "Plan", "Meter", "Bill"
+ * * item-type is one of:
+ * * "item" - to specify an individual item.
+ * * "group" - to specify a resource group.
+ * * id is the resource group id or the resource item id
+ *
+ * Resources can be assigned to one or more ResourceGroups. For example, a Plan can be
+ * assigned to Plan ResourceGroups, a Meter can be assigned to Meter ResourceGroups, and so
+ * on. This is useful for cases where you want to create Permission Policies which allow or
+ * deny access to a specific subset of resources. For example, grant a user access to only
+ * some of the Plans in your Organization.
+ *
+ * This concept of grouping resources applies to every resource in m3ter, including
+ * ResourceGroups themselves. This allows you to nest ResourceGroups to support hierarchies
+ * of groups.
+ *
+ * See
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/managing-organization-and-users/creating-and-managing-permissions)
+ * in the m3ter documentation for more information.
+ *
+ * **Note: User Resource Groups** You can create a User Resource Group to group resources of
+ * type = `user`. You can then retrieve a list of the User Resource Groups a user belongs
+ * to. For more details, see the
+ * [Retrieve OrgUser Groups](https://www.m3ter.com/docs/api#tag/OrgUsers/operation/GetOrgUserGroups)
+ * call in the OrgUsers section.
+ */
fun resourceGroups(): ResourceGroupServiceAsync.WithRawResponse
+ /**
+ * Endpoints for retrieving and managing scheduled Events' configurations.
+ *
+ * Scheduled Event Configurations define custom Event types that reference Date/Time fields
+ * belonging to configuration and billing entities. They therefore provide you with an extra
+ * degree of flexibility over and above system-generated Events for setting up Notifications
+ * based on Events.
+ *
+ * For more details, see the
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our Documenation.
+ */
fun scheduledEventConfigurations(): ScheduledEventConfigurationServiceAsync.WithRawResponse
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights
+ * into the consumption patterns and charges of your end-customer Accounts.
+ */
fun statements(): StatementServiceAsync.WithRawResponse
+ /**
+ * Endpoints for TransactionType operations such as creation, update, list, retrieve, and
+ * delete.
+ *
+ * You can create TransactionTypes for your Organization, which can then be used when
+ * creating and updating Balances. Example TransactionTypes: "Balance Amount" or "Add
+ * Funds".
+ *
+ * For details on creating a Transaction amount for a Balance using a TransactionType you've
+ * created for your Organization, see the
+ * [Create Balance Transaction](https://www.m3ter.com/docs/api#tag/Balances/operation/PostBalanceTransaction)
+ * call in the [Balances](https://www.m3ter.com/docs/api#tag/Balances) section of this API
+ * Reference.
+ */
fun transactionTypes(): TransactionTypeServiceAsync.WithRawResponse
fun usage(): UsageServiceAsync.WithRawResponse
fun users(): UserServiceAsync.WithRawResponse
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the
+ * m3ter platform. The integration endpoints in this section facilitate various operations
+ * such as creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing,
+ * billing and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
fun webhooks(): WebhookServiceAsync.WithRawResponse
}
}
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClientAsyncImpl.kt b/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClientAsyncImpl.kt
index b56b2ad9..cca68b66 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClientAsyncImpl.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClientAsyncImpl.kt
@@ -270,89 +270,940 @@ class M3terClientAsyncImpl(private val clientOptions: ClientOptions) : M3terClie
override fun withOptions(modifier: Consumer): M3terClientAsync =
M3terClientAsyncImpl(clientOptions.toBuilder().apply(modifier::accept).build())
+ /**
+ * Endpoint for retrieving a JSON Web Token (JWT) bearer token for a ServiceUser using the
+ * Client Credentials Grant flow.
+ *
+ * A ServiceUser represents the automated process you want to grant access to your
+ * Organization - that is, as an API user.
+ */
override fun authentication(): AuthenticationServiceAsync = authentication
+ /**
+ * Endpoints for Account related operations such as creation, update, list and delete. An
+ * Account represents one of your end-customer accounts.
+ *
+ * Accounts do not belong to a Product to allow for cases where an end customer takes more than
+ * one of your Products, and the charges for these Products differ.
+ *
+ * You typically attach a priced Plan or Plan Template to an Account before you can generate
+ * bills for the Account:
+ * - If a customer consumes several of your Products, you can attach a priced Plan or Plan
+ * Template to the Account for charging against each Product.
+ * - If an Account is charged solely on the basis of an agreed Prepayment/Commitment amount but
+ * not all of the Prepayment is prepaid, you can use a customized billing schedule for
+ * outstanding fees without having to attach a Plan to the Account to generate Bills.
+ *
+ * You can create Child Accounts for end customers who hold multiple Accounts with you. You can
+ * then set up billing for the Parent/Child Account usage to have the end-customer billed once
+ * for the Parent Account, instead of having separate bills issued for usage against each of
+ * their multiple Accounts.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally Identifiable
+ * Information (PII) in m3ter is restricted to a few fields on the **Account** entity. Please
+ * ensure that only the ``name``, ``address``, or ``emailAddress`` fields contain any
+ * end-customer PII data on any Accounts you create. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for more
+ * details.
+ */
override fun accounts(): AccountServiceAsync = accounts
+ /**
+ * Endpoints for AccountPlan and AccountPlanGroup related operations such as creation, update,
+ * list and delete.
+ *
+ * **AccountPlans** An Account represents one of your end-customer accounts. To create an
+ * AccountPlan, you attach a Product Plan to an Account. The AccountPlan then determines the
+ * charges incurred at billing by your end customer for consuming the Product the Plan is for:
+ * * **AccountPlan Active/Inactive**. Set start and end dates to define the period the
+ * AccountPlan is active for the Account.
+ * * **AccountPlan per Product**. If an end customer consumes multiple Products, create separate
+ * AccountPlans to charge for each Product.
+ *
+ * **AccountPlan Constraints:**
+ * * Only one AccountPlan per Product can be active at any one time for an Account.
+ * * If you create a Plan as a custom Plan for a specific Account, you can only use it to create
+ * an AccountPlan for that Account.
+ *
+ * **AccountPlanGroups** Plan Groups are used when you want to apply a minimum spend amount at
+ * billing across several of your Products each of which are priced separately - when you create
+ * the Plan Group, you define an overall minimum spend and then add any priced Plans you want to
+ * include in the Group. To create an AccounPlanGroup, you can attach a Plan Group to an Account
+ * that consumes the separate Products which are priced using the included Plans. At billing,
+ * the minimum spend you've defined for the Plan Group is applied:
+ * * **Active AccountPlanGroup**. Set the start and end dates to define the period for which the
+ * Plan Group will be active for the Account.
+ *
+ * **Plan Group Notes:**
+ * * You can only add *one Plan for the same Product* to a Plan Group. See the
+ * [Plan Group](https://www.m3ter.com/docs/api#tag/PlanGroup) in this API Reference for more
+ * details on creating Plan Groups.
+ * * You can create a *custom Plan Group* for an Account, which means the Plan Group can only be
+ * attached to that Account to create an AccountPlanGroup.
+ *
+ * **AcountPlanGroup - Notes and Constraints:**
+ * * **AccountPlanGroup is type of AccountPlan** When you attach a Plan Group to an Account,
+ * this creates an AccountPlanGroup. However, the m3ter data model *does not support a
+ * separate AccountPlanGroup entity*, and an AccountPlanGroup is a type of AccountPlan where a
+ * `planGroupId` is used instead of a `planId` when it's created. See the
+ * [Create AccountPlan](https://www.m3ter.com/docs/api#tag/AccountPlan/operation/PostAccountPlan)
+ * call in this section and
+ * [Attaching Plan Groups to an Account](https://www.m3ter.com/docs/guides/end-customer-accounts/attaching-plan-groups-to-an-account)
+ * in our main User Documentation.
+ * * **Multiple AccountPlan Groups:** You can attach more than one Plan Group to an Account to
+ * create multiple AccountPlanGroups, but the rule that *only one attached Plan per Product
+ * can be active at any one time for an Account* is preserved:
+ * * Multiple attached Plan Groups on an Account can have overlapping dates only if none of
+ * the Plan Groups contain a Plan belonging to the same Product. If you try to attach a
+ * Plan Group to an Account with Plan Groups already attached and:
+ * * The new Plan Group contains a Product Plan that also belongs to a Plan Group
+ * already attached to the Account.
+ * * The dates for these "matched Plan" Plan Groups being active for the Account would
+ * overlap.
+ * * Then you'll receive an error and the attachment will be blocked.
+ */
override fun accountPlans(): AccountPlanServiceAsync = accountPlans
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Aggregations.
+ *
+ * An Aggregation links to a Meter and targets a Data Field or Derived Field on the Meter. You
+ * define the method of aggregation used to convert the usage data collected by the targeted
+ * Meter field into a numerical unit of measurement.
+ *
+ * You can then use the unit of measurement an Aggregation yields as a metric for pricing
+ * Product Plans and apply usage-based pricing to your products and services. You might also
+ * want to aggregate raw data measures for other purposes, such as to feed into analytical or
+ * business performance tools.
+ *
+ * **Notes:**
+ * * **Contrast with Compound Aggregations**. Standard or simple Aggregations of this type,
+ * which apply an aggregation method directly to Meter usage data fields, are contrasted with
+ * [Compound Aggregations](https://www.m3ter.com/docs/api#tag/CompoundAggregation). A Compound
+ * Aggregation typically references one or more simple Aggregations and applies a calculation
+ * to them to derive pricing metrics needed to serve more complex usage-based pricing
+ * scenarios.
+ * * **Segmented Aggregations**. Segmented Aggregations allow you to segment the usage data
+ * collected by a single Meter. This capability is very useful for implementing some pricing
+ * and billing use cases. See
+ * [Segmented Aggregations](https://www.m3ter.com/docs/guides/usage-data-aggregations/segmented-aggregations)
+ * in our main documentation for more details.
+ */
override fun aggregations(): AggregationServiceAsync = aggregations
+ /**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative
+ * Transaction amounts for the Balance. To do this, you must first define Transaction Types for
+ * your Organization, and then use one of these Transaction Types when you add a specific
+ * Transaction to a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their
+ * Account, which can then be draw-down against charges due for product or service consumption.
+ * You can include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an
+ * initial free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This acts as
+ * an initial commitment, which allows them to use the service and gain an accurate insight
+ * into their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to subsequent
+ * Bills as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have
+ * agreed to pay for consuming your product or services across a full contract term. A customer
+ * might pay the entire or only part of the agreed amount upfront, but ***the commitment or
+ * prepayment amount is payable regardless of the actual usage by the customer of your service
+ * or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used when a
+ * customer wants to add a credit amount to their Account at any time during the service period
+ * or when you as service provider want to add a credit to a customer Account. This Balance
+ * credit can then be drawn-down against for billing the Account for usage, minimum spend,
+ * standing charges, or recurring charges due. Balances therefore serve payment use cases in a
+ * more flexible way, for example to be used for a "Free Credit" sign-up scheme you offer to
+ * encourage sales or to enhance customer satisfaction by adding credit to an Account to
+ * compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Commitment credit on
+ * an Account is drawn-down - Balance amounts first or Commitment/Prepayment amounts first.
+ */
override fun balances(): BalanceServiceAsync = balances
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights into
+ * the consumption patterns and charges of your end-customer Accounts.
+ */
override fun bills(): BillServiceAsync = bills
+ /**
+ * Endpoints for updating and retreiving the Bill Configuration for an Organization. The
+ * Organization represents your company as a direct customer of the m3ter service.
+ *
+ * You can use the **Update BillConfig** endpoint to set a global lock date for **all** Bills -
+ * any Bill with a service period end date on or before the set date will be locked and cannot
+ * be updated.
+ *
+ * **Warning: Ensure all Bills are Approved!** If you try to set a global lock date when there
+ * remains Bills in a *Pending* state whose service period end date is on or before the
+ * specified lock date, then you'll receive an error.
+ */
override fun billConfig(): BillConfigServiceAsync = billConfig
+ /**
+ * Endpoints that manage Commitments *(also known as Prepayments)* in the context of usage-based
+ * pricing and billing. A Commitment represents an agreement where the end-customer has agreed
+ * to pay a fixed minimum amount throughout the contract period. ***The commitment amount is
+ * payable regardless of the actual usage by the customer of your service or product.***
+ *
+ * These endpoints enable the creation, updating, retrieval, and deletion of Commitments. Use
+ * them to manage your customer's Commitments and ensure optimal revenue recognition:
+ * * Specify which type of charges can draw-down against a Commitment amount on an Account at
+ * billing: usage, minimum spend, standing charges, or recurring charges.
+ * * Define overage surcharge percentages, which are applied when the usage charges exceed the
+ * agreed Commitment amount within the contract duration.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments/Prepayments are used for amounts end-customers have agreed to pay for consuming
+ * your product or services across a full contract term. A customer might pay the entire or only
+ * part of the agreed amount upfront, but ***the prepayment amount is payable regardless of the
+ * actual usage by the customer of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used when a
+ * customer wants to add a credit amount to their Account at any time during the service period
+ * or when you as service provider want to add a credit to a customer Account. This Balance
+ * credit can then be drawn-down against for billing the Account for usage, minimum spend,
+ * standing charges, or recurring charges due. Balances therefore serve payment use cases in a
+ * more flexible way, for example to be used for a "Free Credit" sign-up scheme you offer to
+ * encourage sales or to enhance customer satisfaction by adding credit to an Account to
+ * compensate for service delivery issues.
+ *
+ * You can use Prepayments/Commitments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Prepayment credit on
+ * an Account is drawn-down - Balance amounts first or Prepayment amounts first.
+ *
+ * #### Billing for Commitments
+ *
+ * If not all of an agreed Commitment amount is paid at the start of an end-customer contract
+ * period, you can choose one of two options for billing the outstanding fees due on the
+ * customer Account:
+ * - Select a Product *Plan to bill with*.
+ * - Define a *schedule of billing dates*.
+ */
override fun commitments(): CommitmentServiceAsync = commitments
+ /**
+ * Endpoints for creating, retrieving, listing, and cancelling Bill Jobs.
+ *
+ * Bill Jobs are critical components in billing management, providing asynchronous mechanisms to
+ * calculate and handle bills.
+ *
+ * Bill Jobs give you the flexibiity to run Bills manually for Accounts to suit different
+ * billing management purposes. For example, some historical usage data has come in for an
+ * Account and you want to run a Bill for a specific date on that Account to check that the Bill
+ * is showing correctly for the charges due on the new usage data.
+ */
override fun billJobs(): BillJobServiceAsync = billJobs
+ /**
+ * Endpoints for creating/updating/deleting Charges.
+ *
+ * Create Charges for your end-customer Accounts to create ad-hoc line items for Account
+ * billing. Charges are:
+ * * Created for either debit or credit amounts.
+ * * Linked to a Product for accounting purposes.
+ * * Optionally linked to a Contract.
+ * * Given a specific date for billing. When a bill job has run for the specified Charge bill
+ * date, a Charge appears as an Ad-hoc line item on the Bill.
+ * * Assigned a service period.
+ * * Available in any currency defined for your Organization. See
+ * [Creating Charges for Accounts](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-charges-for-accounts)
+ * in our main user documentation for more details.
+ *
+ * Alternatively, you can create a Charge for a Balance on an end-customer Account to create
+ * balance fee line items for Account billing. See
+ * [Creating Charges for Balances](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-balances-for-accounts/creating-charges-for-balances)
+ * in our main user documentation for more details.
+ */
override fun charges(): ChargeServiceAsync = charges
+ /**
+ * Endpoints for Compound Aggregation related operations such as creation, update, list and
+ * delete.
+ *
+ * Use Compound Aggregations to create numerical measures from usage data by applying a
+ * calculation to one or more simple Aggregations or Custom Fields. These numerical measures can
+ * then be used as pricing metrics to price your Product Plans, enabling you to implement a wide
+ * range of usage-based pricing use cases.
+ *
+ * You can create two types of Compound Aggregation:
+ *
+ * **Global**
+ * - Pricing: Not tied to any specific product and can be used to price Plans belonging to any
+ * Product.
+ * - Calculation: can reference all simple Aggregations - both Global simple Aggregations and
+ * any product-specific simple Aggregations.
+ *
+ * **Product-specific**
+ * - Pricing: belong to a specific Product and can only be used to price Plans belonging to the
+ * same Product.
+ * - Calculation: can reference any simple Aggregations belonging to the same Product and any
+ * Global simple Aggregations.
+ *
+ * **IMPORTANT!** If a simple Aggregation referenced by a Compound Aggregation has a **Quantity
+ * per unit** defined or a **Rounding** defined, these will not be factored into the value used
+ * by the calculation. For example, if the simple Aggregation referenced has a base value of 100
+ * and has **Quantity per unit** set at 10, the Compound Aggregation calculation *will use the
+ * base value of 100 not 10*.
+ *
+ * To better understand and use Compound Aggregations, refer to the example
+ * [Compound Aggregation Use Case](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/compound-aggregations#example-use-case)
+ * in the m3ter documentation.
+ */
override fun compoundAggregations(): CompoundAggregationServiceAsync = compoundAggregations
+ /**
+ * Endpoints for Contract related operations such as creation, update, list and delete.
+ *
+ * Contracts are created for Accounts, which are your end-user customers. Contracts can be used
+ * for:
+ * * **Accounts Reporting**. To serve your general accounting operations and processes, you can
+ * report on total Contract values for an Account.
+ * * **Contract Billing**. Various billing entities associated with an Account can be linked to
+ * Contracts on the Account to meet your specific Contract billing use cases.
+ */
override fun contracts(): ContractServiceAsync = contracts
+ /**
+ * Endpoints for listing, creating, retrieving, updating, or deleting Counters.
+ *
+ * You can create Counters for your m3ter Organization, which can then be used as pricing
+ * metrics to apply a unit-based
+ * [CounterPricing](https://www.m3ter.com/docs/api#tag/CounterPricing) to Product Plans or Plan
+ * Templates for recurring subscription charges on Accounts.
+ *
+ * Counters can then be used to post
+ * [CounterAdjustments](https://www.m3ter.com/docs/api#tag/CounterAdjustments) on your
+ * end-customer Accounts.
+ *
+ * Accounts are then billed in accordance with the CounterPricing on Plans attached to the
+ * Accounts and for the actual Counter quantities Accounts subscribe to. See
+ * [Recurring Charges: Counters](https://www.m3ter.com/docs/guides/recurring-charges-counters)
+ * in our main user documentation for more details.
+ */
override fun counters(): CounterServiceAsync = counters
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterAdjustments.
+ *
+ * If you attach a Plan to an Account which is priced using a Counter to apply unit-based
+ * pricing, you can then create CounterAdjustments for the Account using that Counter to ensure
+ * the Account is billed according to the number of Counter units the Account subscribes to in a
+ * given billing period.
+ *
+ * See
+ * [Understanding and Creating Counter Adjustments for Accounts](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counter-adjustments-for-accounts)
+ * for more information.
+ */
override fun counterAdjustments(): CounterAdjustmentServiceAsync = counterAdjustments
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterPricing.
+ *
+ * Create the CounterPricing for a Plan/PlanTemplate using a Counter, and define a unit-based
+ * pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Creating Counters and Pricing Plans](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counters)
+ * for more information.
+ */
override fun counterPricings(): CounterPricingServiceAsync = counterPricings
+ /**
+ * Endpoints for CreditReason operations such as creation, update, list, and delete.
+ *
+ * You can create CreditReasons for your Organization, and then use them when creating a credit
+ * line item on a bill, or applying a product credit to a bill. CreditReasons provide contextual
+ * information as to why a credit was applied.
+ */
override fun creditReasons(): CreditReasonServiceAsync = creditReasons
+ /**
+ * Endpoints for Currency operations such as creation, update, list, and delete. Currencies are
+ * stored for your Organization, and can then be used to specify currencies on various entities
+ * such as plan groups and plan templates.
+ *
+ * **IMPORTANT!** The Currencies you want to use in your Organization must be created first.
+ *
+ * The currency you select for your Organization determines the billing currency and overrides
+ * any currency settings in your pricing Plans. For example, if the Organization currency is set
+ * to USD and a pricing Plan used for an Account is set to GBP, the bill for an Account using
+ * that Plan is calculated in GBP, and then each bill line item converted to USD amounts.
+ *
+ * Currency conversion rates are setup in the *OrganizationConfig*. For more details, see
+ * [Creating and Managing Currencies](https://www.m3ter.com/docs/guides/organization-and-access-management/viewing-and-editing-organization#creating-and-managing-currencies)
+ * in the m3ter Documentation.
+ */
override fun currencies(): CurrencyServiceAsync = currencies
+ /**
+ * Endpoints for retrieving and updating Custom Fields at the Organization level for all
+ * entities that support them.
+ *
+ * Custom Fields in m3ter allow you to store custom data in the form of number or string values
+ * against m3ter entities in a way that does not directly affect the normal working operation of
+ * the m3ter platform. Having this capability to store data in a free-hand fashion can prove
+ * very useful in helping you to meet specific usage-based pricing and other operational
+ * business use cases.
+ *
+ * However, you can exploit the values stored on Custom Fields in a more direct way by
+ * referencing them in Derived Field and Compound Aggregation calculations. Given the key role
+ * these calculations can play when implementing usage-based pricing schema, any Custom Fields
+ * you reference will then affect how the platform behaves. Referencing Custom Field values in
+ * your calculations offers a much wider scope of options when it comes to resolving complex
+ * usage-based pricing use cases.
+ *
+ * Custom Fields can be added to the following entities at Organizational level:
+ * * Organization
+ * * Account
+ * * AccountPlan
+ * * Aggregation
+ * * Compound Aggregation
+ * * Meter
+ * * Product
+ * * Plan
+ * * PlanTemplate
+ * * Contract
+ *
+ * These all follow the same pattern - a new *(optional)* field is available on the entity
+ * request and response bodies called "customFields" which is a object in this format:
+ * ```
+ * "customFields": {
+ * "exampleCustomField1": 7.1,
+ * "exampleCustomField2": "stringValue"
+ * }
+ * ```
+ *
+ * The value for a Custom Field can be a string or a number.
+ *
+ * **Using Custom Field values in calculations:**
+ * - You can add Custom Fields at two levels - the Organization level and the individual entity
+ * level.
+ * - The Organizational level field provides a default value and *must be added* if you want to
+ * also add a Custom Field of the same name at the corresponding individual entity level. If
+ * you reference the Custom Field in a calculation, the value for the individual entity level
+ * field is used. If no field is defined at individual entity level, then the Organization
+ * level field value is used.
+ *
+ * **Important: Constraints and Exceptions!**
+ *
+ * **Custom Fields at Organization Level**. Currently, you cannot create Custom Fields at the
+ * Organization-level for the following enitites:
+ * * Plan Group
+ * * Balance
+ * * Balance Transaction Schedule
+ * * Balance Charge Schedule
+ *
+ * Therefore you cannot reference the Custom Fields values created at the individual entity
+ * level for these entities in your Derived Field or Compound Aggregation calculations.
+ *
+ * **Derived Field Calculations**. You can *only reference Custom Fields* for the following
+ * entities:
+ * * Organization
+ * * Meter
+ * * Account
+ *
+ * However, if you are using Meters belonging to *a specific Product*, that is, not *Global
+ * Meters*, you can also reference Custom Fields added to a Product in Derived Field
+ * calculations.
+ *
+ * **Compound Aggregation Calculations - Meter Custom Fields**. The value of the *Organization
+ * level Meter Custom Field will always be used*, even if you have defined a corresponding field
+ * at the individual Meter level.
+ *
+ * See
+ * [Working with Custom Fields](https://www.m3ter.com/docs/guides/creating-and-managing-products/working-with-custom-fields)
+ * in the m3ter documentation for more information.
+ */
override fun customFields(): CustomFieldServiceAsync = customFields
+ /**
+ * Endpoints for triggering one-off, ad-hoc Data Exports. You can set up and run ad-hoc Exports
+ * to export two kinds of data from your m3ter Organization:
+ * * Usage data.
+ * * Operational data for entities.
+ *
+ * **Ad-Hoc Export Destinations** When setting up and running an ad-hoc Export:
+ * * You can define one or more Export Destinations - see the
+ * [ExportDestination](https://www.m3ter.com/docs/api#tag/ExportDestination) section of this
+ * API Reference. When the export runs, the data is sent through to the sepecified
+ * Destination. However, the export file is also made available for you to download it
+ * locally.
+ * * You can set up and run Data Exports without defining a Destination. The data is not
+ * exported but the compiled export file is made available for downloading locally.
+ * * For details on downloading an export file, see the
+ * [Get Data Export File Download URL](https://www.m3ter.com/docs/api#tag/ExportDestination/operation/GenerateDataExportFileDownloadUrl)
+ * endpoint in this API Reference.
+ *
+ * **Preview Version!** The Data Export feature is currently available only in Preview release
+ * version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Preview release definition. ExportAdHoc endpoints will only be available if Data Export
+ * has been enabled for your Organization. For more details see
+ * [Data Export(Preview)](https://www.m3ter.com/docs/guides/data-exports) in our main User
+ * documentation. If you're interested in previewing the Data Export feature, please get in
+ * touch with m3ter Support or your m3ter contact.
+ */
override fun dataExports(): DataExportServiceAsync = dataExports
+ /**
+ * Endpoints for DebitReason operations such as creation, update, list, and delete.
+ *
+ * You can create DebitReasons for your Organization, and then use them when creating a debit
+ * line item on a bill, or applying a product debit to a bill. DebitReasons provide contextual
+ * information as to why a debit was applied.
+ */
override fun debitReasons(): DebitReasonServiceAsync = debitReasons
+ /**
+ * This section provides Endpoints for operations that allow you to retrieve detailed
+ * information about individual Events, list all Events or specific Event Types, and explore
+ * dynamic fields available for each Event Type.
+ *
+ * Events encompass specific instances of state changes within the system, such as the creation
+ * of a new Prepayment/Commitment for an Account. Each Event is classified under an Event Type
+ * framework, providing context about what kind of change occurred to generate the Event.
+ *
+ * **Events for Configuration and Billing Entities**
+ *
+ * Many Event Types cover common configuration and billing objects, where the Event is generated
+ * for a state change of one of these objects - for when the configuration or billing object is
+ * **created**, **deleted**, or **updated**.
+ *
+ * For example:
+ * * configuration.commitment.created
+ * * configuration.commitment.deleted
+ * * configuration.commitment.updated
+ * * configuration.account.created
+ * * configuration.account.deleted
+ * * configuration.account.updated
+ * * billing.bill.created
+ * * billing.bill.deleted
+ * * billing.bill.created
+ *
+ * **Events for Errors or Failures**
+ *
+ * There are also Event Types for certain kinds of error that can occur:
+ * * For an Integration:
+ * * validation
+ * * authentication
+ * * perform
+ * * missing account mapping
+ * * disabled
+ * * For a Usage Data Ingest Submission:
+ * * validation failure
+ * * For Data Export Jobs:
+ * * data export job failure
+ *
+ * **Scheduled Events**
+ *
+ * In addition to system-generated Events that occur when a configuration entity undergoes a
+ * state change at creation, update, or deletion of the entity, you can use API calls to create
+ * and configure *Scheduled Event Configurations*. Scheduled Events are custom Event types,
+ * which you can set up by referencing Date/Time fields on configuration and billing entities.
+ * See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference for more details.
+ *
+ * **Notifications for Events**
+ *
+ * You can create Notification rules based on Events and these rules can reference and apply
+ * calculations to the Event's fields. This allows you to set up customized alerts to be sent
+ * out via webhooks when the Event occurs and any conditions you've built into the Notification
+ * rule's calculation are satisfied.
+ *
+ * See the [Notifications](https://www.m3ter.com/docs/api#tag/Notifications) section for more
+ * details.
+ *
+ * **Other Events**
+ *
+ * When Events occur, they can cause other Events, such as when a Notification is triggered by
+ * the Event it is based on. For these Events there are currently two categories:
+ * * Notification
+ * * IntegrationEvent
+ *
+ * Also see
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * and
+ * [Object Definitions and API Calls](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications/object-definitions-and-api-calls)
+ * in the m3ter documentation for more guidance.
+ */
override fun events(): EventServiceAsync = events
+ /**
+ * Endpoints for managing External Mapping related operations such as creation, update, list and
+ * delete.
+ *
+ * When you integrate your 3rd-party systems with the m3ter platform, a mapping between entities
+ * in the local system *(m3ter)* and external systems is constructed. This *External Mapping* is
+ * crucial in scenarios where data from external systems is consumed or where data from the
+ * local system is to be synchronized with external systems.
+ *
+ * When you are working to set up your Integrations and want to test or troubleshoot your
+ * implementation before going live, you might need to create External Mappings manually and, at
+ * a later date, edit or delete them.
+ */
override fun externalMappings(): ExternalMappingServiceAsync = externalMappings
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the m3ter
+ * platform. The integration endpoints in this section facilitate various operations such as
+ * creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing, billing
+ * and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
override fun integrationConfigurations(): IntegrationConfigurationServiceAsync =
integrationConfigurations
+ /**
+ * Endpoints for creating/updating/deleting Lookup Tables.
+ *
+ * Lookup Tables enable you to manage dynamic data mappings that your calculations reference.
+ * Use them for currency conversion, pricing tiers, discount rates, and similar scenarios where
+ * you require values to change operationally but for calculation logic to remain constant.
+ *
+ * **Beta Version!** The Lookup Table feature is currently available in Beta release version.
+ * See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition. Lookup Table endpoints will only be available if Lookup Tables
+ * have been enabled for your Organization. For more details see
+ * [Lookup Tables (Beta)](https://www.m3ter.com/docs/guides/lookup-tables) in our main User
+ * documentation.
+ */
override fun lookupTables(): LookupTableServiceAsync = lookupTables
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Meters.
+ *
+ * Use Meters to submit usage data for the consumption of your products and services by end
+ * customers. This usage data then becomes the basis for setting up usage-based pricing for your
+ * products and services.
+ *
+ * Examples of usage data collected in Meters:
+ * * Number of logins.
+ * * Duration of session.
+ * * Amount of data downloaded.
+ *
+ * To collect usage data and ingest it into the platform, you can define two types of fields for
+ * Meters:
+ * - `dataFields` Used to collect raw usage data measures - numeric quantitative data values or
+ * non-numeric point data values.
+ * - `derivedFields` Used to derive usage data measures that are the result of applying a
+ * calculation to `dataFields`, `customFields`, or system `Timestamp` fields.
+ *
+ * You can also:
+ * - Create `customFields` for a Meter, which allows you to attach custom data to the Meter as
+ * name/value pairs.
+ * - Create Global Meters, which are not tied to a specific Product and allow you to collect
+ * usage data that will form the basis of usage-based pricing across multiple Products.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally Identifiable
+ * Information (PII) in m3ter is restricted to a few fields on the **Account** entity. Please
+ * ensure that any fields you configure for Meters, such as Data Fields or Derived Fields, do
+ * not contain any end-customer PII data. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for more
+ * details.
+ *
+ * See also:
+ * - [Reviewing Meter
+ * Options](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/reviewing-meter-options).
+ */
override fun meters(): MeterServiceAsync = meters
+ /**
+ * This section provides endpoints for managing Event Notifications.
+ *
+ * You can create Notifications based on system Events generated by the platform. When you base
+ * a Notification on a specific Event type, you can include a calculation that references the
+ * fields available on that Event type to define precise conditions that must be met for the
+ * Notification to be triggered when an Event of that type occurs. In this way, you can set up
+ * highly customized Notifications that act as timely alerts to inform you about significant
+ * occurrences within your Organization. For instance, if you provide a sign-up bonus to new
+ * end-customer Accounts, you can set up a Notification to alert you when an end-customer
+ * Account has used up a certain percentage of their bonus credit.
+ *
+ * You can also set up Notifications based on Scheduled Event types you've created for your
+ * Organization. See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference and
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our user documentation.
+ *
+ * For more details on Event types and their fields, see the
+ * [Events](https://www.m3ter.com/docs/api#tag/Events) section.
+ *
+ * For detailed guidance on working with Events and Notifications, refer to the
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * section of the m3ter user documentation.
+ */
override fun notificationConfigurations(): NotificationConfigurationServiceAsync =
notificationConfigurations
+ /**
+ * Endpoints for retrieving or updating the Organization Config.
+ *
+ * Organization represents your company as a direct customer of m3ter. Use Organization
+ * configuration to define *Organization-wide* settings. For example:
+ * - Timezone.
+ * - Currencies and currency conversions.
+ * - Billing operations settings, such as:
+ * - Epoch dates to control first billing dates.
+ * - Whether to bill customer accounts in advance/in arrears for standing charge amounts,
+ * minimum spend amounts, and commitment fees.
+ *
+ * For other aspects of your Organization setup and configuration, see the following sections in
+ * this API Reference:
+ * * [Custom Fields](https://www.m3ter.com/docs/api#tag/CustomField)
+ * * [Currencies](https://www.m3ter.com/docs/api#tag/Currency)
+ * * [Credit Reasons](https://www.m3ter.com/docs/api#tag/CreditReason)
+ * * [Debit Reason](https://www.m3ter.com/docs/api#tag/DebitReason)
+ * * [Transaction Types](https://www.m3ter.com/docs/api#tag/TransactionType)
+ *
+ * See also:
+ * - [Managing your
+ * Organization](https://www.m3ter.com/docs/guides/managing-organization-and-users/viewing-and-editing-organization).
+ */
override fun organizationConfig(): OrganizationConfigServiceAsync = organizationConfig
+ /**
+ * Endpoints for Permission Policy related operations such as creation, update, add and
+ * retrieve.
+ *
+ * Permission Policies can restrict or grant access to specific resources for both Users
+ * *(people)* and Service Users *(automated processes with direct API access)*. This enables you
+ * to control precisely what a User can do in your m3ter Organization.
+ *
+ * For more details, see
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/organization-and-access-management/creating-and-managing-permissions#permission-policy-statements---available-actions-and-resources)
+ * in our main Documentation.
+ */
override fun permissionPolicies(): PermissionPolicyServiceAsync = permissionPolicies
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Plans.
+ *
+ * A Plan is based on a PlanTemplate and represents a specific pricing plan for one of your
+ * products or services. Each Plan inherits general billing attributes or pricing structure from
+ * its parent Plan Template. Some attributes can be overriden for the specific Plan.
+ *
+ * When you've created the Plan Templates and Plans you need for your Products, you can
+ * configure the exact pricing structures for Plans to charge customers that consume one or more
+ * of your Products.
+ *
+ * You can then attach the appropriately priced Plans to customer Accounts to create
+ * [Account Plans](https://www.m3ter.com/docs/api#tag/AccountPlan) and enable charges to be
+ * calculated correctly for billing against those Accounts.
+ *
+ * See also:
+ * - [Reviewing Options for Plans and Plan
+ * Templates](https://www.m3ter.com/docs/guides/working-with-plan-templates-and-plans/reviewing-configuration-options-for-plans-and-plan-templates).
+ */
override fun plans(): PlanServiceAsync = plans
+ /**
+ * Endpoints for PlanGroup related operations such as creation, update, retrieve, list and
+ * delete.
+ *
+ * PlanGroups are constructs that group multiple plans together. This enables a unified approach
+ * to efficiently handle various uses cases across different plans. For example applying a
+ * minimum spend amount at billing, across several of your products or features that are each
+ * priced separately.
+ */
override fun planGroups(): PlanGroupServiceAsync = planGroups
+ /**
+ * Endpoints for PlanGroupLink related operations such as creation, update, list and delete.
+ *
+ * PlanGroupLinks are the intersection table between a PlanGroup and its associated Plans. A
+ * PlanGroupLink is only created when at least 1 Plan is linked to a PlanGroup.
+ */
override fun planGroupLinks(): PlanGroupLinkServiceAsync = planGroupLinks
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting PlanTemplates.
+ *
+ * Use PlanTemplates to define default values for Plans. These default values control the
+ * billing operations you want applied to your products. PlanTemplates avoid repetition in
+ * configuration work - many Plans will share settings for billing operations and differ only in
+ * the details of their pricing structures.
+ *
+ * A PlanTemplate is linked to a Product, and each Plan is a child of a PlanTemplate.
+ */
override fun planTemplates(): PlanTemplateServiceAsync = planTemplates
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Pricing.
+ *
+ * Create the Pricing for a Plan/PlanTemplate with usage data Aggregations, and define a
+ * usage-based pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Reviewing Pricing Options for Plans and Plan Templates](https://www.m3ter.com/docs/guides/pricing-plans/reviewing-pricing-options-and-pricing-plans)
+ * for more information.
+ */
override fun pricings(): PricingServiceAsync = pricings
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Products.
+ *
+ * A Product represents the products and services you offer to your end customers. Products act
+ * as a container for the Meters, Aggregations, Pricing, and Plans required to implement
+ * usage-based and other pricing models for your Organization.
+ */
override fun products(): ProductServiceAsync = products
+ /**
+ * Endpoints for ResourceGroup related operations such as creation, update, list and delete.
+ *
+ * ResourceGroups are used in the context of Permission Policies, which controls what a User who
+ * has been given access to your Organization can and cannot do. For example, you might want to
+ * create a Permissions Policy that denies Users the ability to retrieve Meters.
+ *
+ * Resources are defined as m3ter Resource Identifiers *(MRIs)* in the format:
+ * ```
+ * service:resource-type/item-type/id
+ * ```
+ *
+ * Where:
+ * * service is a distinct part of the overall m3ter system, and which forms a natural
+ * functional grouping, such as "config" or "billing".
+ * * resource-type is the resource type item accessed - for example: "Plan", "Meter", "Bill"
+ * * item-type is one of:
+ * * "item" - to specify an individual item.
+ * * "group" - to specify a resource group.
+ * * id is the resource group id or the resource item id
+ *
+ * Resources can be assigned to one or more ResourceGroups. For example, a Plan can be assigned
+ * to Plan ResourceGroups, a Meter can be assigned to Meter ResourceGroups, and so on. This is
+ * useful for cases where you want to create Permission Policies which allow or deny access to a
+ * specific subset of resources. For example, grant a user access to only some of the Plans in
+ * your Organization.
+ *
+ * This concept of grouping resources applies to every resource in m3ter, including
+ * ResourceGroups themselves. This allows you to nest ResourceGroups to support hierarchies of
+ * groups.
+ *
+ * See
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/managing-organization-and-users/creating-and-managing-permissions)
+ * in the m3ter documentation for more information.
+ *
+ * **Note: User Resource Groups** You can create a User Resource Group to group resources of
+ * type = `user`. You can then retrieve a list of the User Resource Groups a user belongs to.
+ * For more details, see the
+ * [Retrieve OrgUser Groups](https://www.m3ter.com/docs/api#tag/OrgUsers/operation/GetOrgUserGroups)
+ * call in the OrgUsers section.
+ */
override fun resourceGroups(): ResourceGroupServiceAsync = resourceGroups
+ /**
+ * Endpoints for retrieving and managing scheduled Events' configurations.
+ *
+ * Scheduled Event Configurations define custom Event types that reference Date/Time fields
+ * belonging to configuration and billing entities. They therefore provide you with an extra
+ * degree of flexibility over and above system-generated Events for setting up Notifications
+ * based on Events.
+ *
+ * For more details, see the
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our Documenation.
+ */
override fun scheduledEventConfigurations(): ScheduledEventConfigurationServiceAsync =
scheduledEventConfigurations
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights into
+ * the consumption patterns and charges of your end-customer Accounts.
+ */
override fun statements(): StatementServiceAsync = statements
+ /**
+ * Endpoints for TransactionType operations such as creation, update, list, retrieve, and
+ * delete.
+ *
+ * You can create TransactionTypes for your Organization, which can then be used when creating
+ * and updating Balances. Example TransactionTypes: "Balance Amount" or "Add Funds".
+ *
+ * For details on creating a Transaction amount for a Balance using a TransactionType you've
+ * created for your Organization, see the
+ * [Create Balance Transaction](https://www.m3ter.com/docs/api#tag/Balances/operation/PostBalanceTransaction)
+ * call in the [Balances](https://www.m3ter.com/docs/api#tag/Balances) section of this API
+ * Reference.
+ */
override fun transactionTypes(): TransactionTypeServiceAsync = transactionTypes
override fun usage(): UsageServiceAsync = usage
override fun users(): UserServiceAsync = users
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the m3ter
+ * platform. The integration endpoints in this section facilitate various operations such as
+ * creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing, billing
+ * and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
override fun webhooks(): WebhookServiceAsync = webhooks
override fun close() = clientOptions.close()
@@ -534,88 +1385,928 @@ class M3terClientAsyncImpl(private val clientOptions: ClientOptions) : M3terClie
clientOptions.toBuilder().apply(modifier::accept).build()
)
+ /**
+ * Endpoint for retrieving a JSON Web Token (JWT) bearer token for a ServiceUser using the
+ * Client Credentials Grant flow.
+ *
+ * A ServiceUser represents the automated process you want to grant access to your
+ * Organization - that is, as an API user.
+ */
override fun authentication(): AuthenticationServiceAsync.WithRawResponse = authentication
+ /**
+ * Endpoints for Account related operations such as creation, update, list and delete. An
+ * Account represents one of your end-customer accounts.
+ *
+ * Accounts do not belong to a Product to allow for cases where an end customer takes more
+ * than one of your Products, and the charges for these Products differ.
+ *
+ * You typically attach a priced Plan or Plan Template to an Account before you can generate
+ * bills for the Account:
+ * - If a customer consumes several of your Products, you can attach a priced Plan or Plan
+ * Template to the Account for charging against each Product.
+ * - If an Account is charged solely on the basis of an agreed Prepayment/Commitment amount
+ * but not all of the Prepayment is prepaid, you can use a customized billing schedule for
+ * outstanding fees without having to attach a Plan to the Account to generate Bills.
+ *
+ * You can create Child Accounts for end customers who hold multiple Accounts with you. You
+ * can then set up billing for the Parent/Child Account usage to have the end-customer
+ * billed once for the Parent Account, instead of having separate bills issued for usage
+ * against each of their multiple Accounts.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally
+ * Identifiable Information (PII) in m3ter is restricted to a few fields on the **Account**
+ * entity. Please ensure that only the ``name``, ``address``, or ``emailAddress`` fields
+ * contain any end-customer PII data on any Accounts you create. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for
+ * more details.
+ */
override fun accounts(): AccountServiceAsync.WithRawResponse = accounts
+ /**
+ * Endpoints for AccountPlan and AccountPlanGroup related operations such as creation,
+ * update, list and delete.
+ *
+ * **AccountPlans** An Account represents one of your end-customer accounts. To create an
+ * AccountPlan, you attach a Product Plan to an Account. The AccountPlan then determines the
+ * charges incurred at billing by your end customer for consuming the Product the Plan is
+ * for:
+ * * **AccountPlan Active/Inactive**. Set start and end dates to define the period the
+ * AccountPlan is active for the Account.
+ * * **AccountPlan per Product**. If an end customer consumes multiple Products, create
+ * separate AccountPlans to charge for each Product.
+ *
+ * **AccountPlan Constraints:**
+ * * Only one AccountPlan per Product can be active at any one time for an Account.
+ * * If you create a Plan as a custom Plan for a specific Account, you can only use it to
+ * create an AccountPlan for that Account.
+ *
+ * **AccountPlanGroups** Plan Groups are used when you want to apply a minimum spend amount
+ * at billing across several of your Products each of which are priced separately - when you
+ * create the Plan Group, you define an overall minimum spend and then add any priced Plans
+ * you want to include in the Group. To create an AccounPlanGroup, you can attach a Plan
+ * Group to an Account that consumes the separate Products which are priced using the
+ * included Plans. At billing, the minimum spend you've defined for the Plan Group is
+ * applied:
+ * * **Active AccountPlanGroup**. Set the start and end dates to define the period for which
+ * the Plan Group will be active for the Account.
+ *
+ * **Plan Group Notes:**
+ * * You can only add *one Plan for the same Product* to a Plan Group. See the
+ * [Plan Group](https://www.m3ter.com/docs/api#tag/PlanGroup) in this API Reference for
+ * more details on creating Plan Groups.
+ * * You can create a *custom Plan Group* for an Account, which means the Plan Group can
+ * only be attached to that Account to create an AccountPlanGroup.
+ *
+ * **AcountPlanGroup - Notes and Constraints:**
+ * * **AccountPlanGroup is type of AccountPlan** When you attach a Plan Group to an Account,
+ * this creates an AccountPlanGroup. However, the m3ter data model *does not support a
+ * separate AccountPlanGroup entity*, and an AccountPlanGroup is a type of AccountPlan
+ * where a `planGroupId` is used instead of a `planId` when it's created. See the
+ * [Create AccountPlan](https://www.m3ter.com/docs/api#tag/AccountPlan/operation/PostAccountPlan)
+ * call in this section and
+ * [Attaching Plan Groups to an Account](https://www.m3ter.com/docs/guides/end-customer-accounts/attaching-plan-groups-to-an-account)
+ * in our main User Documentation.
+ * * **Multiple AccountPlan Groups:** You can attach more than one Plan Group to an Account
+ * to create multiple AccountPlanGroups, but the rule that *only one attached Plan per
+ * Product can be active at any one time for an Account* is preserved:
+ * * Multiple attached Plan Groups on an Account can have overlapping dates only if none
+ * of the Plan Groups contain a Plan belonging to the same Product. If you try to
+ * attach a Plan Group to an Account with Plan Groups already attached and:
+ * * The new Plan Group contains a Product Plan that also belongs to a Plan Group
+ * already attached to the Account.
+ * * The dates for these "matched Plan" Plan Groups being active for the Account
+ * would overlap.
+ * * Then you'll receive an error and the attachment will be blocked.
+ */
override fun accountPlans(): AccountPlanServiceAsync.WithRawResponse = accountPlans
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Aggregations.
+ *
+ * An Aggregation links to a Meter and targets a Data Field or Derived Field on the Meter.
+ * You define the method of aggregation used to convert the usage data collected by the
+ * targeted Meter field into a numerical unit of measurement.
+ *
+ * You can then use the unit of measurement an Aggregation yields as a metric for pricing
+ * Product Plans and apply usage-based pricing to your products and services. You might also
+ * want to aggregate raw data measures for other purposes, such as to feed into analytical
+ * or business performance tools.
+ *
+ * **Notes:**
+ * * **Contrast with Compound Aggregations**. Standard or simple Aggregations of this type,
+ * which apply an aggregation method directly to Meter usage data fields, are contrasted
+ * with [Compound Aggregations](https://www.m3ter.com/docs/api#tag/CompoundAggregation). A
+ * Compound Aggregation typically references one or more simple Aggregations and applies a
+ * calculation to them to derive pricing metrics needed to serve more complex usage-based
+ * pricing scenarios.
+ * * **Segmented Aggregations**. Segmented Aggregations allow you to segment the usage data
+ * collected by a single Meter. This capability is very useful for implementing some
+ * pricing and billing use cases. See
+ * [Segmented Aggregations](https://www.m3ter.com/docs/guides/usage-data-aggregations/segmented-aggregations)
+ * in our main documentation for more details.
+ */
override fun aggregations(): AggregationServiceAsync.WithRawResponse = aggregations
+ /**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative
+ * Transaction amounts for the Balance. To do this, you must first define Transaction Types
+ * for your Organization, and then use one of these Transaction Types when you add a
+ * specific Transaction to a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their
+ * Account, which can then be draw-down against charges due for product or service
+ * consumption. You can include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an
+ * initial free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This
+ * acts as an initial commitment, which allows them to use the service and gain an
+ * accurate insight into their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to
+ * subsequent Bills as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have
+ * agreed to pay for consuming your product or services across a full contract term. A
+ * customer might pay the entire or only part of the agreed amount upfront, but ***the
+ * commitment or prepayment amount is payable regardless of the actual usage by the customer
+ * of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used
+ * when a customer wants to add a credit amount to their Account at any time during the
+ * service period or when you as service provider want to add a credit to a customer
+ * Account. This Balance credit can then be drawn-down against for billing the Account for
+ * usage, minimum spend, standing charges, or recurring charges due. Balances therefore
+ * serve payment use cases in a more flexible way, for example to be used for a "Free
+ * Credit" sign-up scheme you offer to encourage sales or to enhance customer satisfaction
+ * by adding credit to an Account to compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Commitment credit
+ * on an Account is drawn-down - Balance amounts first or Commitment/Prepayment amounts
+ * first.
+ */
override fun balances(): BalanceServiceAsync.WithRawResponse = balances
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights
+ * into the consumption patterns and charges of your end-customer Accounts.
+ */
override fun bills(): BillServiceAsync.WithRawResponse = bills
+ /**
+ * Endpoints for updating and retreiving the Bill Configuration for an Organization. The
+ * Organization represents your company as a direct customer of the m3ter service.
+ *
+ * You can use the **Update BillConfig** endpoint to set a global lock date for **all**
+ * Bills - any Bill with a service period end date on or before the set date will be locked
+ * and cannot be updated.
+ *
+ * **Warning: Ensure all Bills are Approved!** If you try to set a global lock date when
+ * there remains Bills in a *Pending* state whose service period end date is on or before
+ * the specified lock date, then you'll receive an error.
+ */
override fun billConfig(): BillConfigServiceAsync.WithRawResponse = billConfig
+ /**
+ * Endpoints that manage Commitments *(also known as Prepayments)* in the context of
+ * usage-based pricing and billing. A Commitment represents an agreement where the
+ * end-customer has agreed to pay a fixed minimum amount throughout the contract period.
+ * ***The commitment amount is payable regardless of the actual usage by the customer of
+ * your service or product.***
+ *
+ * These endpoints enable the creation, updating, retrieval, and deletion of Commitments.
+ * Use them to manage your customer's Commitments and ensure optimal revenue recognition:
+ * * Specify which type of charges can draw-down against a Commitment amount on an Account
+ * at billing: usage, minimum spend, standing charges, or recurring charges.
+ * * Define overage surcharge percentages, which are applied when the usage charges exceed
+ * the agreed Commitment amount within the contract duration.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments/Prepayments are used for amounts end-customers have agreed to pay for
+ * consuming your product or services across a full contract term. A customer might pay the
+ * entire or only part of the agreed amount upfront, but ***the prepayment amount is payable
+ * regardless of the actual usage by the customer of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used
+ * when a customer wants to add a credit amount to their Account at any time during the
+ * service period or when you as service provider want to add a credit to a customer
+ * Account. This Balance credit can then be drawn-down against for billing the Account for
+ * usage, minimum spend, standing charges, or recurring charges due. Balances therefore
+ * serve payment use cases in a more flexible way, for example to be used for a "Free
+ * Credit" sign-up scheme you offer to encourage sales or to enhance customer satisfaction
+ * by adding credit to an Account to compensate for service delivery issues.
+ *
+ * You can use Prepayments/Commitments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Prepayment credit
+ * on an Account is drawn-down - Balance amounts first or Prepayment amounts first.
+ *
+ * #### Billing for Commitments
+ *
+ * If not all of an agreed Commitment amount is paid at the start of an end-customer
+ * contract period, you can choose one of two options for billing the outstanding fees due
+ * on the customer Account:
+ * - Select a Product *Plan to bill with*.
+ * - Define a *schedule of billing dates*.
+ */
override fun commitments(): CommitmentServiceAsync.WithRawResponse = commitments
+ /**
+ * Endpoints for creating, retrieving, listing, and cancelling Bill Jobs.
+ *
+ * Bill Jobs are critical components in billing management, providing asynchronous
+ * mechanisms to calculate and handle bills.
+ *
+ * Bill Jobs give you the flexibiity to run Bills manually for Accounts to suit different
+ * billing management purposes. For example, some historical usage data has come in for an
+ * Account and you want to run a Bill for a specific date on that Account to check that the
+ * Bill is showing correctly for the charges due on the new usage data.
+ */
override fun billJobs(): BillJobServiceAsync.WithRawResponse = billJobs
+ /**
+ * Endpoints for creating/updating/deleting Charges.
+ *
+ * Create Charges for your end-customer Accounts to create ad-hoc line items for Account
+ * billing. Charges are:
+ * * Created for either debit or credit amounts.
+ * * Linked to a Product for accounting purposes.
+ * * Optionally linked to a Contract.
+ * * Given a specific date for billing. When a bill job has run for the specified Charge
+ * bill date, a Charge appears as an Ad-hoc line item on the Bill.
+ * * Assigned a service period.
+ * * Available in any currency defined for your Organization. See
+ * [Creating Charges for Accounts](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-charges-for-accounts)
+ * in our main user documentation for more details.
+ *
+ * Alternatively, you can create a Charge for a Balance on an end-customer Account to create
+ * balance fee line items for Account billing. See
+ * [Creating Charges for Balances](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-balances-for-accounts/creating-charges-for-balances)
+ * in our main user documentation for more details.
+ */
override fun charges(): ChargeServiceAsync.WithRawResponse = charges
+ /**
+ * Endpoints for Compound Aggregation related operations such as creation, update, list and
+ * delete.
+ *
+ * Use Compound Aggregations to create numerical measures from usage data by applying a
+ * calculation to one or more simple Aggregations or Custom Fields. These numerical measures
+ * can then be used as pricing metrics to price your Product Plans, enabling you to
+ * implement a wide range of usage-based pricing use cases.
+ *
+ * You can create two types of Compound Aggregation:
+ *
+ * **Global**
+ * - Pricing: Not tied to any specific product and can be used to price Plans belonging to
+ * any Product.
+ * - Calculation: can reference all simple Aggregations - both Global simple Aggregations
+ * and any product-specific simple Aggregations.
+ *
+ * **Product-specific**
+ * - Pricing: belong to a specific Product and can only be used to price Plans belonging to
+ * the same Product.
+ * - Calculation: can reference any simple Aggregations belonging to the same Product and
+ * any Global simple Aggregations.
+ *
+ * **IMPORTANT!** If a simple Aggregation referenced by a Compound Aggregation has a
+ * **Quantity per unit** defined or a **Rounding** defined, these will not be factored into
+ * the value used by the calculation. For example, if the simple Aggregation referenced has
+ * a base value of 100 and has **Quantity per unit** set at 10, the Compound Aggregation
+ * calculation *will use the base value of 100 not 10*.
+ *
+ * To better understand and use Compound Aggregations, refer to the example
+ * [Compound Aggregation Use Case](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/compound-aggregations#example-use-case)
+ * in the m3ter documentation.
+ */
override fun compoundAggregations(): CompoundAggregationServiceAsync.WithRawResponse =
compoundAggregations
+ /**
+ * Endpoints for Contract related operations such as creation, update, list and delete.
+ *
+ * Contracts are created for Accounts, which are your end-user customers. Contracts can be
+ * used for:
+ * * **Accounts Reporting**. To serve your general accounting operations and processes, you
+ * can report on total Contract values for an Account.
+ * * **Contract Billing**. Various billing entities associated with an Account can be linked
+ * to Contracts on the Account to meet your specific Contract billing use cases.
+ */
override fun contracts(): ContractServiceAsync.WithRawResponse = contracts
+ /**
+ * Endpoints for listing, creating, retrieving, updating, or deleting Counters.
+ *
+ * You can create Counters for your m3ter Organization, which can then be used as pricing
+ * metrics to apply a unit-based
+ * [CounterPricing](https://www.m3ter.com/docs/api#tag/CounterPricing) to Product Plans or
+ * Plan Templates for recurring subscription charges on Accounts.
+ *
+ * Counters can then be used to post
+ * [CounterAdjustments](https://www.m3ter.com/docs/api#tag/CounterAdjustments) on your
+ * end-customer Accounts.
+ *
+ * Accounts are then billed in accordance with the CounterPricing on Plans attached to the
+ * Accounts and for the actual Counter quantities Accounts subscribe to. See
+ * [Recurring Charges: Counters](https://www.m3ter.com/docs/guides/recurring-charges-counters)
+ * in our main user documentation for more details.
+ */
override fun counters(): CounterServiceAsync.WithRawResponse = counters
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterAdjustments.
+ *
+ * If you attach a Plan to an Account which is priced using a Counter to apply unit-based
+ * pricing, you can then create CounterAdjustments for the Account using that Counter to
+ * ensure the Account is billed according to the number of Counter units the Account
+ * subscribes to in a given billing period.
+ *
+ * See
+ * [Understanding and Creating Counter Adjustments for Accounts](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counter-adjustments-for-accounts)
+ * for more information.
+ */
override fun counterAdjustments(): CounterAdjustmentServiceAsync.WithRawResponse =
counterAdjustments
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterPricing.
+ *
+ * Create the CounterPricing for a Plan/PlanTemplate using a Counter, and define a
+ * unit-based pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Creating Counters and Pricing Plans](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counters)
+ * for more information.
+ */
override fun counterPricings(): CounterPricingServiceAsync.WithRawResponse = counterPricings
+ /**
+ * Endpoints for CreditReason operations such as creation, update, list, and delete.
+ *
+ * You can create CreditReasons for your Organization, and then use them when creating a
+ * credit line item on a bill, or applying a product credit to a bill. CreditReasons provide
+ * contextual information as to why a credit was applied.
+ */
override fun creditReasons(): CreditReasonServiceAsync.WithRawResponse = creditReasons
+ /**
+ * Endpoints for Currency operations such as creation, update, list, and delete. Currencies
+ * are stored for your Organization, and can then be used to specify currencies on various
+ * entities such as plan groups and plan templates.
+ *
+ * **IMPORTANT!** The Currencies you want to use in your Organization must be created first.
+ *
+ * The currency you select for your Organization determines the billing currency and
+ * overrides any currency settings in your pricing Plans. For example, if the Organization
+ * currency is set to USD and a pricing Plan used for an Account is set to GBP, the bill for
+ * an Account using that Plan is calculated in GBP, and then each bill line item converted
+ * to USD amounts.
+ *
+ * Currency conversion rates are setup in the *OrganizationConfig*. For more details, see
+ * [Creating and Managing Currencies](https://www.m3ter.com/docs/guides/organization-and-access-management/viewing-and-editing-organization#creating-and-managing-currencies)
+ * in the m3ter Documentation.
+ */
override fun currencies(): CurrencyServiceAsync.WithRawResponse = currencies
+ /**
+ * Endpoints for retrieving and updating Custom Fields at the Organization level for all
+ * entities that support them.
+ *
+ * Custom Fields in m3ter allow you to store custom data in the form of number or string
+ * values against m3ter entities in a way that does not directly affect the normal working
+ * operation of the m3ter platform. Having this capability to store data in a free-hand
+ * fashion can prove very useful in helping you to meet specific usage-based pricing and
+ * other operational business use cases.
+ *
+ * However, you can exploit the values stored on Custom Fields in a more direct way by
+ * referencing them in Derived Field and Compound Aggregation calculations. Given the key
+ * role these calculations can play when implementing usage-based pricing schema, any Custom
+ * Fields you reference will then affect how the platform behaves. Referencing Custom Field
+ * values in your calculations offers a much wider scope of options when it comes to
+ * resolving complex usage-based pricing use cases.
+ *
+ * Custom Fields can be added to the following entities at Organizational level:
+ * * Organization
+ * * Account
+ * * AccountPlan
+ * * Aggregation
+ * * Compound Aggregation
+ * * Meter
+ * * Product
+ * * Plan
+ * * PlanTemplate
+ * * Contract
+ *
+ * These all follow the same pattern - a new *(optional)* field is available on the entity
+ * request and response bodies called "customFields" which is a object in this format:
+ * ```
+ * "customFields": {
+ * "exampleCustomField1": 7.1,
+ * "exampleCustomField2": "stringValue"
+ * }
+ * ```
+ *
+ * The value for a Custom Field can be a string or a number.
+ *
+ * **Using Custom Field values in calculations:**
+ * - You can add Custom Fields at two levels - the Organization level and the individual
+ * entity level.
+ * - The Organizational level field provides a default value and *must be added* if you want
+ * to also add a Custom Field of the same name at the corresponding individual entity
+ * level. If you reference the Custom Field in a calculation, the value for the individual
+ * entity level field is used. If no field is defined at individual entity level, then the
+ * Organization level field value is used.
+ *
+ * **Important: Constraints and Exceptions!**
+ *
+ * **Custom Fields at Organization Level**. Currently, you cannot create Custom Fields at
+ * the Organization-level for the following enitites:
+ * * Plan Group
+ * * Balance
+ * * Balance Transaction Schedule
+ * * Balance Charge Schedule
+ *
+ * Therefore you cannot reference the Custom Fields values created at the individual entity
+ * level for these entities in your Derived Field or Compound Aggregation calculations.
+ *
+ * **Derived Field Calculations**. You can *only reference Custom Fields* for the following
+ * entities:
+ * * Organization
+ * * Meter
+ * * Account
+ *
+ * However, if you are using Meters belonging to *a specific Product*, that is, not *Global
+ * Meters*, you can also reference Custom Fields added to a Product in Derived Field
+ * calculations.
+ *
+ * **Compound Aggregation Calculations - Meter Custom Fields**. The value of the
+ * *Organization level Meter Custom Field will always be used*, even if you have defined a
+ * corresponding field at the individual Meter level.
+ *
+ * See
+ * [Working with Custom Fields](https://www.m3ter.com/docs/guides/creating-and-managing-products/working-with-custom-fields)
+ * in the m3ter documentation for more information.
+ */
override fun customFields(): CustomFieldServiceAsync.WithRawResponse = customFields
+ /**
+ * Endpoints for triggering one-off, ad-hoc Data Exports. You can set up and run ad-hoc
+ * Exports to export two kinds of data from your m3ter Organization:
+ * * Usage data.
+ * * Operational data for entities.
+ *
+ * **Ad-Hoc Export Destinations** When setting up and running an ad-hoc Export:
+ * * You can define one or more Export Destinations - see the
+ * [ExportDestination](https://www.m3ter.com/docs/api#tag/ExportDestination) section of
+ * this API Reference. When the export runs, the data is sent through to the sepecified
+ * Destination. However, the export file is also made available for you to download it
+ * locally.
+ * * You can set up and run Data Exports without defining a Destination. The data is not
+ * exported but the compiled export file is made available for downloading locally.
+ * * For details on downloading an export file, see the
+ * [Get Data Export File Download URL](https://www.m3ter.com/docs/api#tag/ExportDestination/operation/GenerateDataExportFileDownloadUrl)
+ * endpoint in this API Reference.
+ *
+ * **Preview Version!** The Data Export feature is currently available only in Preview
+ * release version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Preview release definition. ExportAdHoc endpoints will only be available if Data
+ * Export has been enabled for your Organization. For more details see
+ * [Data Export(Preview)](https://www.m3ter.com/docs/guides/data-exports) in our main User
+ * documentation. If you're interested in previewing the Data Export feature, please get in
+ * touch with m3ter Support or your m3ter contact.
+ */
override fun dataExports(): DataExportServiceAsync.WithRawResponse = dataExports
+ /**
+ * Endpoints for DebitReason operations such as creation, update, list, and delete.
+ *
+ * You can create DebitReasons for your Organization, and then use them when creating a
+ * debit line item on a bill, or applying a product debit to a bill. DebitReasons provide
+ * contextual information as to why a debit was applied.
+ */
override fun debitReasons(): DebitReasonServiceAsync.WithRawResponse = debitReasons
+ /**
+ * This section provides Endpoints for operations that allow you to retrieve detailed
+ * information about individual Events, list all Events or specific Event Types, and explore
+ * dynamic fields available for each Event Type.
+ *
+ * Events encompass specific instances of state changes within the system, such as the
+ * creation of a new Prepayment/Commitment for an Account. Each Event is classified under an
+ * Event Type framework, providing context about what kind of change occurred to generate
+ * the Event.
+ *
+ * **Events for Configuration and Billing Entities**
+ *
+ * Many Event Types cover common configuration and billing objects, where the Event is
+ * generated for a state change of one of these objects - for when the configuration or
+ * billing object is **created**, **deleted**, or **updated**.
+ *
+ * For example:
+ * * configuration.commitment.created
+ * * configuration.commitment.deleted
+ * * configuration.commitment.updated
+ * * configuration.account.created
+ * * configuration.account.deleted
+ * * configuration.account.updated
+ * * billing.bill.created
+ * * billing.bill.deleted
+ * * billing.bill.created
+ *
+ * **Events for Errors or Failures**
+ *
+ * There are also Event Types for certain kinds of error that can occur:
+ * * For an Integration:
+ * * validation
+ * * authentication
+ * * perform
+ * * missing account mapping
+ * * disabled
+ * * For a Usage Data Ingest Submission:
+ * * validation failure
+ * * For Data Export Jobs:
+ * * data export job failure
+ *
+ * **Scheduled Events**
+ *
+ * In addition to system-generated Events that occur when a configuration entity undergoes a
+ * state change at creation, update, or deletion of the entity, you can use API calls to
+ * create and configure *Scheduled Event Configurations*. Scheduled Events are custom Event
+ * types, which you can set up by referencing Date/Time fields on configuration and billing
+ * entities. See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference for more details.
+ *
+ * **Notifications for Events**
+ *
+ * You can create Notification rules based on Events and these rules can reference and apply
+ * calculations to the Event's fields. This allows you to set up customized alerts to be
+ * sent out via webhooks when the Event occurs and any conditions you've built into the
+ * Notification rule's calculation are satisfied.
+ *
+ * See the [Notifications](https://www.m3ter.com/docs/api#tag/Notifications) section for
+ * more details.
+ *
+ * **Other Events**
+ *
+ * When Events occur, they can cause other Events, such as when a Notification is triggered
+ * by the Event it is based on. For these Events there are currently two categories:
+ * * Notification
+ * * IntegrationEvent
+ *
+ * Also see
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * and
+ * [Object Definitions and API Calls](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications/object-definitions-and-api-calls)
+ * in the m3ter documentation for more guidance.
+ */
override fun events(): EventServiceAsync.WithRawResponse = events
+ /**
+ * Endpoints for managing External Mapping related operations such as creation, update, list
+ * and delete.
+ *
+ * When you integrate your 3rd-party systems with the m3ter platform, a mapping between
+ * entities in the local system *(m3ter)* and external systems is constructed. This
+ * *External Mapping* is crucial in scenarios where data from external systems is consumed
+ * or where data from the local system is to be synchronized with external systems.
+ *
+ * When you are working to set up your Integrations and want to test or troubleshoot your
+ * implementation before going live, you might need to create External Mappings manually
+ * and, at a later date, edit or delete them.
+ */
override fun externalMappings(): ExternalMappingServiceAsync.WithRawResponse =
externalMappings
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the
+ * m3ter platform. The integration endpoints in this section facilitate various operations
+ * such as creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing,
+ * billing and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
override fun integrationConfigurations():
IntegrationConfigurationServiceAsync.WithRawResponse = integrationConfigurations
+ /**
+ * Endpoints for creating/updating/deleting Lookup Tables.
+ *
+ * Lookup Tables enable you to manage dynamic data mappings that your calculations
+ * reference. Use them for currency conversion, pricing tiers, discount rates, and similar
+ * scenarios where you require values to change operationally but for calculation logic to
+ * remain constant.
+ *
+ * **Beta Version!** The Lookup Table feature is currently available in Beta release
+ * version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition. Lookup Table endpoints will only be available if Lookup
+ * Tables have been enabled for your Organization. For more details see
+ * [Lookup Tables (Beta)](https://www.m3ter.com/docs/guides/lookup-tables) in our main User
+ * documentation.
+ */
override fun lookupTables(): LookupTableServiceAsync.WithRawResponse = lookupTables
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Meters.
+ *
+ * Use Meters to submit usage data for the consumption of your products and services by end
+ * customers. This usage data then becomes the basis for setting up usage-based pricing for
+ * your products and services.
+ *
+ * Examples of usage data collected in Meters:
+ * * Number of logins.
+ * * Duration of session.
+ * * Amount of data downloaded.
+ *
+ * To collect usage data and ingest it into the platform, you can define two types of fields
+ * for Meters:
+ * - `dataFields` Used to collect raw usage data measures - numeric quantitative data values
+ * or non-numeric point data values.
+ * - `derivedFields` Used to derive usage data measures that are the result of applying a
+ * calculation to `dataFields`, `customFields`, or system `Timestamp` fields.
+ *
+ * You can also:
+ * - Create `customFields` for a Meter, which allows you to attach custom data to the Meter
+ * as name/value pairs.
+ * - Create Global Meters, which are not tied to a specific Product and allow you to collect
+ * usage data that will form the basis of usage-based pricing across multiple Products.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally
+ * Identifiable Information (PII) in m3ter is restricted to a few fields on the **Account**
+ * entity. Please ensure that any fields you configure for Meters, such as Data Fields or
+ * Derived Fields, do not contain any end-customer PII data. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for
+ * more details.
+ *
+ * See also:
+ * - [Reviewing Meter
+ * Options](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/reviewing-meter-options).
+ */
override fun meters(): MeterServiceAsync.WithRawResponse = meters
+ /**
+ * This section provides endpoints for managing Event Notifications.
+ *
+ * You can create Notifications based on system Events generated by the platform. When you
+ * base a Notification on a specific Event type, you can include a calculation that
+ * references the fields available on that Event type to define precise conditions that must
+ * be met for the Notification to be triggered when an Event of that type occurs. In this
+ * way, you can set up highly customized Notifications that act as timely alerts to inform
+ * you about significant occurrences within your Organization. For instance, if you provide
+ * a sign-up bonus to new end-customer Accounts, you can set up a Notification to alert you
+ * when an end-customer Account has used up a certain percentage of their bonus credit.
+ *
+ * You can also set up Notifications based on Scheduled Event types you've created for your
+ * Organization. See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference and
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our user documentation.
+ *
+ * For more details on Event types and their fields, see the
+ * [Events](https://www.m3ter.com/docs/api#tag/Events) section.
+ *
+ * For detailed guidance on working with Events and Notifications, refer to the
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * section of the m3ter user documentation.
+ */
override fun notificationConfigurations():
NotificationConfigurationServiceAsync.WithRawResponse = notificationConfigurations
+ /**
+ * Endpoints for retrieving or updating the Organization Config.
+ *
+ * Organization represents your company as a direct customer of m3ter. Use Organization
+ * configuration to define *Organization-wide* settings. For example:
+ * - Timezone.
+ * - Currencies and currency conversions.
+ * - Billing operations settings, such as:
+ * - Epoch dates to control first billing dates.
+ * - Whether to bill customer accounts in advance/in arrears for standing charge
+ * amounts, minimum spend amounts, and commitment fees.
+ *
+ * For other aspects of your Organization setup and configuration, see the following
+ * sections in this API Reference:
+ * * [Custom Fields](https://www.m3ter.com/docs/api#tag/CustomField)
+ * * [Currencies](https://www.m3ter.com/docs/api#tag/Currency)
+ * * [Credit Reasons](https://www.m3ter.com/docs/api#tag/CreditReason)
+ * * [Debit Reason](https://www.m3ter.com/docs/api#tag/DebitReason)
+ * * [Transaction Types](https://www.m3ter.com/docs/api#tag/TransactionType)
+ *
+ * See also:
+ * - [Managing your
+ * Organization](https://www.m3ter.com/docs/guides/managing-organization-and-users/viewing-and-editing-organization).
+ */
override fun organizationConfig(): OrganizationConfigServiceAsync.WithRawResponse =
organizationConfig
+ /**
+ * Endpoints for Permission Policy related operations such as creation, update, add and
+ * retrieve.
+ *
+ * Permission Policies can restrict or grant access to specific resources for both Users
+ * *(people)* and Service Users *(automated processes with direct API access)*. This enables
+ * you to control precisely what a User can do in your m3ter Organization.
+ *
+ * For more details, see
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/organization-and-access-management/creating-and-managing-permissions#permission-policy-statements---available-actions-and-resources)
+ * in our main Documentation.
+ */
override fun permissionPolicies(): PermissionPolicyServiceAsync.WithRawResponse =
permissionPolicies
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Plans.
+ *
+ * A Plan is based on a PlanTemplate and represents a specific pricing plan for one of your
+ * products or services. Each Plan inherits general billing attributes or pricing structure
+ * from its parent Plan Template. Some attributes can be overriden for the specific Plan.
+ *
+ * When you've created the Plan Templates and Plans you need for your Products, you can
+ * configure the exact pricing structures for Plans to charge customers that consume one or
+ * more of your Products.
+ *
+ * You can then attach the appropriately priced Plans to customer Accounts to create
+ * [Account Plans](https://www.m3ter.com/docs/api#tag/AccountPlan) and enable charges to be
+ * calculated correctly for billing against those Accounts.
+ *
+ * See also:
+ * - [Reviewing Options for Plans and Plan
+ * Templates](https://www.m3ter.com/docs/guides/working-with-plan-templates-and-plans/reviewing-configuration-options-for-plans-and-plan-templates).
+ */
override fun plans(): PlanServiceAsync.WithRawResponse = plans
+ /**
+ * Endpoints for PlanGroup related operations such as creation, update, retrieve, list and
+ * delete.
+ *
+ * PlanGroups are constructs that group multiple plans together. This enables a unified
+ * approach to efficiently handle various uses cases across different plans. For example
+ * applying a minimum spend amount at billing, across several of your products or features
+ * that are each priced separately.
+ */
override fun planGroups(): PlanGroupServiceAsync.WithRawResponse = planGroups
+ /**
+ * Endpoints for PlanGroupLink related operations such as creation, update, list and delete.
+ *
+ * PlanGroupLinks are the intersection table between a PlanGroup and its associated Plans. A
+ * PlanGroupLink is only created when at least 1 Plan is linked to a PlanGroup.
+ */
override fun planGroupLinks(): PlanGroupLinkServiceAsync.WithRawResponse = planGroupLinks
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting PlanTemplates.
+ *
+ * Use PlanTemplates to define default values for Plans. These default values control the
+ * billing operations you want applied to your products. PlanTemplates avoid repetition in
+ * configuration work - many Plans will share settings for billing operations and differ
+ * only in the details of their pricing structures.
+ *
+ * A PlanTemplate is linked to a Product, and each Plan is a child of a PlanTemplate.
+ */
override fun planTemplates(): PlanTemplateServiceAsync.WithRawResponse = planTemplates
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Pricing.
+ *
+ * Create the Pricing for a Plan/PlanTemplate with usage data Aggregations, and define a
+ * usage-based pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Reviewing Pricing Options for Plans and Plan Templates](https://www.m3ter.com/docs/guides/pricing-plans/reviewing-pricing-options-and-pricing-plans)
+ * for more information.
+ */
override fun pricings(): PricingServiceAsync.WithRawResponse = pricings
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Products.
+ *
+ * A Product represents the products and services you offer to your end customers. Products
+ * act as a container for the Meters, Aggregations, Pricing, and Plans required to implement
+ * usage-based and other pricing models for your Organization.
+ */
override fun products(): ProductServiceAsync.WithRawResponse = products
+ /**
+ * Endpoints for ResourceGroup related operations such as creation, update, list and delete.
+ *
+ * ResourceGroups are used in the context of Permission Policies, which controls what a User
+ * who has been given access to your Organization can and cannot do. For example, you might
+ * want to create a Permissions Policy that denies Users the ability to retrieve Meters.
+ *
+ * Resources are defined as m3ter Resource Identifiers *(MRIs)* in the format:
+ * ```
+ * service:resource-type/item-type/id
+ * ```
+ *
+ * Where:
+ * * service is a distinct part of the overall m3ter system, and which forms a natural
+ * functional grouping, such as "config" or "billing".
+ * * resource-type is the resource type item accessed - for example: "Plan", "Meter", "Bill"
+ * * item-type is one of:
+ * * "item" - to specify an individual item.
+ * * "group" - to specify a resource group.
+ * * id is the resource group id or the resource item id
+ *
+ * Resources can be assigned to one or more ResourceGroups. For example, a Plan can be
+ * assigned to Plan ResourceGroups, a Meter can be assigned to Meter ResourceGroups, and so
+ * on. This is useful for cases where you want to create Permission Policies which allow or
+ * deny access to a specific subset of resources. For example, grant a user access to only
+ * some of the Plans in your Organization.
+ *
+ * This concept of grouping resources applies to every resource in m3ter, including
+ * ResourceGroups themselves. This allows you to nest ResourceGroups to support hierarchies
+ * of groups.
+ *
+ * See
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/managing-organization-and-users/creating-and-managing-permissions)
+ * in the m3ter documentation for more information.
+ *
+ * **Note: User Resource Groups** You can create a User Resource Group to group resources of
+ * type = `user`. You can then retrieve a list of the User Resource Groups a user belongs
+ * to. For more details, see the
+ * [Retrieve OrgUser Groups](https://www.m3ter.com/docs/api#tag/OrgUsers/operation/GetOrgUserGroups)
+ * call in the OrgUsers section.
+ */
override fun resourceGroups(): ResourceGroupServiceAsync.WithRawResponse = resourceGroups
+ /**
+ * Endpoints for retrieving and managing scheduled Events' configurations.
+ *
+ * Scheduled Event Configurations define custom Event types that reference Date/Time fields
+ * belonging to configuration and billing entities. They therefore provide you with an extra
+ * degree of flexibility over and above system-generated Events for setting up Notifications
+ * based on Events.
+ *
+ * For more details, see the
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our Documenation.
+ */
override fun scheduledEventConfigurations():
ScheduledEventConfigurationServiceAsync.WithRawResponse = scheduledEventConfigurations
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights
+ * into the consumption patterns and charges of your end-customer Accounts.
+ */
override fun statements(): StatementServiceAsync.WithRawResponse = statements
+ /**
+ * Endpoints for TransactionType operations such as creation, update, list, retrieve, and
+ * delete.
+ *
+ * You can create TransactionTypes for your Organization, which can then be used when
+ * creating and updating Balances. Example TransactionTypes: "Balance Amount" or "Add
+ * Funds".
+ *
+ * For details on creating a Transaction amount for a Balance using a TransactionType you've
+ * created for your Organization, see the
+ * [Create Balance Transaction](https://www.m3ter.com/docs/api#tag/Balances/operation/PostBalanceTransaction)
+ * call in the [Balances](https://www.m3ter.com/docs/api#tag/Balances) section of this API
+ * Reference.
+ */
override fun transactionTypes(): TransactionTypeServiceAsync.WithRawResponse =
transactionTypes
@@ -623,6 +2314,25 @@ class M3terClientAsyncImpl(private val clientOptions: ClientOptions) : M3terClie
override fun users(): UserServiceAsync.WithRawResponse = users
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the
+ * m3ter platform. The integration endpoints in this section facilitate various operations
+ * such as creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing,
+ * billing and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
override fun webhooks(): WebhookServiceAsync.WithRawResponse = webhooks
}
}
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClientImpl.kt b/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClientImpl.kt
index 34c477ed..93890b97 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClientImpl.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/client/M3terClientImpl.kt
@@ -248,89 +248,940 @@ class M3terClientImpl(private val clientOptions: ClientOptions) : M3terClient {
override fun withOptions(modifier: Consumer): M3terClient =
M3terClientImpl(clientOptions.toBuilder().apply(modifier::accept).build())
+ /**
+ * Endpoint for retrieving a JSON Web Token (JWT) bearer token for a ServiceUser using the
+ * Client Credentials Grant flow.
+ *
+ * A ServiceUser represents the automated process you want to grant access to your
+ * Organization - that is, as an API user.
+ */
override fun authentication(): AuthenticationService = authentication
+ /**
+ * Endpoints for Account related operations such as creation, update, list and delete. An
+ * Account represents one of your end-customer accounts.
+ *
+ * Accounts do not belong to a Product to allow for cases where an end customer takes more than
+ * one of your Products, and the charges for these Products differ.
+ *
+ * You typically attach a priced Plan or Plan Template to an Account before you can generate
+ * bills for the Account:
+ * - If a customer consumes several of your Products, you can attach a priced Plan or Plan
+ * Template to the Account for charging against each Product.
+ * - If an Account is charged solely on the basis of an agreed Prepayment/Commitment amount but
+ * not all of the Prepayment is prepaid, you can use a customized billing schedule for
+ * outstanding fees without having to attach a Plan to the Account to generate Bills.
+ *
+ * You can create Child Accounts for end customers who hold multiple Accounts with you. You can
+ * then set up billing for the Parent/Child Account usage to have the end-customer billed once
+ * for the Parent Account, instead of having separate bills issued for usage against each of
+ * their multiple Accounts.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally Identifiable
+ * Information (PII) in m3ter is restricted to a few fields on the **Account** entity. Please
+ * ensure that only the ``name``, ``address``, or ``emailAddress`` fields contain any
+ * end-customer PII data on any Accounts you create. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for more
+ * details.
+ */
override fun accounts(): AccountService = accounts
+ /**
+ * Endpoints for AccountPlan and AccountPlanGroup related operations such as creation, update,
+ * list and delete.
+ *
+ * **AccountPlans** An Account represents one of your end-customer accounts. To create an
+ * AccountPlan, you attach a Product Plan to an Account. The AccountPlan then determines the
+ * charges incurred at billing by your end customer for consuming the Product the Plan is for:
+ * * **AccountPlan Active/Inactive**. Set start and end dates to define the period the
+ * AccountPlan is active for the Account.
+ * * **AccountPlan per Product**. If an end customer consumes multiple Products, create separate
+ * AccountPlans to charge for each Product.
+ *
+ * **AccountPlan Constraints:**
+ * * Only one AccountPlan per Product can be active at any one time for an Account.
+ * * If you create a Plan as a custom Plan for a specific Account, you can only use it to create
+ * an AccountPlan for that Account.
+ *
+ * **AccountPlanGroups** Plan Groups are used when you want to apply a minimum spend amount at
+ * billing across several of your Products each of which are priced separately - when you create
+ * the Plan Group, you define an overall minimum spend and then add any priced Plans you want to
+ * include in the Group. To create an AccounPlanGroup, you can attach a Plan Group to an Account
+ * that consumes the separate Products which are priced using the included Plans. At billing,
+ * the minimum spend you've defined for the Plan Group is applied:
+ * * **Active AccountPlanGroup**. Set the start and end dates to define the period for which the
+ * Plan Group will be active for the Account.
+ *
+ * **Plan Group Notes:**
+ * * You can only add *one Plan for the same Product* to a Plan Group. See the
+ * [Plan Group](https://www.m3ter.com/docs/api#tag/PlanGroup) in this API Reference for more
+ * details on creating Plan Groups.
+ * * You can create a *custom Plan Group* for an Account, which means the Plan Group can only be
+ * attached to that Account to create an AccountPlanGroup.
+ *
+ * **AcountPlanGroup - Notes and Constraints:**
+ * * **AccountPlanGroup is type of AccountPlan** When you attach a Plan Group to an Account,
+ * this creates an AccountPlanGroup. However, the m3ter data model *does not support a
+ * separate AccountPlanGroup entity*, and an AccountPlanGroup is a type of AccountPlan where a
+ * `planGroupId` is used instead of a `planId` when it's created. See the
+ * [Create AccountPlan](https://www.m3ter.com/docs/api#tag/AccountPlan/operation/PostAccountPlan)
+ * call in this section and
+ * [Attaching Plan Groups to an Account](https://www.m3ter.com/docs/guides/end-customer-accounts/attaching-plan-groups-to-an-account)
+ * in our main User Documentation.
+ * * **Multiple AccountPlan Groups:** You can attach more than one Plan Group to an Account to
+ * create multiple AccountPlanGroups, but the rule that *only one attached Plan per Product
+ * can be active at any one time for an Account* is preserved:
+ * * Multiple attached Plan Groups on an Account can have overlapping dates only if none of
+ * the Plan Groups contain a Plan belonging to the same Product. If you try to attach a
+ * Plan Group to an Account with Plan Groups already attached and:
+ * * The new Plan Group contains a Product Plan that also belongs to a Plan Group
+ * already attached to the Account.
+ * * The dates for these "matched Plan" Plan Groups being active for the Account would
+ * overlap.
+ * * Then you'll receive an error and the attachment will be blocked.
+ */
override fun accountPlans(): AccountPlanService = accountPlans
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Aggregations.
+ *
+ * An Aggregation links to a Meter and targets a Data Field or Derived Field on the Meter. You
+ * define the method of aggregation used to convert the usage data collected by the targeted
+ * Meter field into a numerical unit of measurement.
+ *
+ * You can then use the unit of measurement an Aggregation yields as a metric for pricing
+ * Product Plans and apply usage-based pricing to your products and services. You might also
+ * want to aggregate raw data measures for other purposes, such as to feed into analytical or
+ * business performance tools.
+ *
+ * **Notes:**
+ * * **Contrast with Compound Aggregations**. Standard or simple Aggregations of this type,
+ * which apply an aggregation method directly to Meter usage data fields, are contrasted with
+ * [Compound Aggregations](https://www.m3ter.com/docs/api#tag/CompoundAggregation). A Compound
+ * Aggregation typically references one or more simple Aggregations and applies a calculation
+ * to them to derive pricing metrics needed to serve more complex usage-based pricing
+ * scenarios.
+ * * **Segmented Aggregations**. Segmented Aggregations allow you to segment the usage data
+ * collected by a single Meter. This capability is very useful for implementing some pricing
+ * and billing use cases. See
+ * [Segmented Aggregations](https://www.m3ter.com/docs/guides/usage-data-aggregations/segmented-aggregations)
+ * in our main documentation for more details.
+ */
override fun aggregations(): AggregationService = aggregations
+ /**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative
+ * Transaction amounts for the Balance. To do this, you must first define Transaction Types for
+ * your Organization, and then use one of these Transaction Types when you add a specific
+ * Transaction to a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their
+ * Account, which can then be draw-down against charges due for product or service consumption.
+ * You can include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an
+ * initial free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This acts as
+ * an initial commitment, which allows them to use the service and gain an accurate insight
+ * into their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to subsequent
+ * Bills as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have
+ * agreed to pay for consuming your product or services across a full contract term. A customer
+ * might pay the entire or only part of the agreed amount upfront, but ***the commitment or
+ * prepayment amount is payable regardless of the actual usage by the customer of your service
+ * or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used when a
+ * customer wants to add a credit amount to their Account at any time during the service period
+ * or when you as service provider want to add a credit to a customer Account. This Balance
+ * credit can then be drawn-down against for billing the Account for usage, minimum spend,
+ * standing charges, or recurring charges due. Balances therefore serve payment use cases in a
+ * more flexible way, for example to be used for a "Free Credit" sign-up scheme you offer to
+ * encourage sales or to enhance customer satisfaction by adding credit to an Account to
+ * compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Commitment credit on
+ * an Account is drawn-down - Balance amounts first or Commitment/Prepayment amounts first.
+ */
override fun balances(): BalanceService = balances
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights into
+ * the consumption patterns and charges of your end-customer Accounts.
+ */
override fun bills(): BillService = bills
+ /**
+ * Endpoints for updating and retreiving the Bill Configuration for an Organization. The
+ * Organization represents your company as a direct customer of the m3ter service.
+ *
+ * You can use the **Update BillConfig** endpoint to set a global lock date for **all** Bills -
+ * any Bill with a service period end date on or before the set date will be locked and cannot
+ * be updated.
+ *
+ * **Warning: Ensure all Bills are Approved!** If you try to set a global lock date when there
+ * remains Bills in a *Pending* state whose service period end date is on or before the
+ * specified lock date, then you'll receive an error.
+ */
override fun billConfig(): BillConfigService = billConfig
+ /**
+ * Endpoints that manage Commitments *(also known as Prepayments)* in the context of usage-based
+ * pricing and billing. A Commitment represents an agreement where the end-customer has agreed
+ * to pay a fixed minimum amount throughout the contract period. ***The commitment amount is
+ * payable regardless of the actual usage by the customer of your service or product.***
+ *
+ * These endpoints enable the creation, updating, retrieval, and deletion of Commitments. Use
+ * them to manage your customer's Commitments and ensure optimal revenue recognition:
+ * * Specify which type of charges can draw-down against a Commitment amount on an Account at
+ * billing: usage, minimum spend, standing charges, or recurring charges.
+ * * Define overage surcharge percentages, which are applied when the usage charges exceed the
+ * agreed Commitment amount within the contract duration.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments/Prepayments are used for amounts end-customers have agreed to pay for consuming
+ * your product or services across a full contract term. A customer might pay the entire or only
+ * part of the agreed amount upfront, but ***the prepayment amount is payable regardless of the
+ * actual usage by the customer of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used when a
+ * customer wants to add a credit amount to their Account at any time during the service period
+ * or when you as service provider want to add a credit to a customer Account. This Balance
+ * credit can then be drawn-down against for billing the Account for usage, minimum spend,
+ * standing charges, or recurring charges due. Balances therefore serve payment use cases in a
+ * more flexible way, for example to be used for a "Free Credit" sign-up scheme you offer to
+ * encourage sales or to enhance customer satisfaction by adding credit to an Account to
+ * compensate for service delivery issues.
+ *
+ * You can use Prepayments/Commitments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Prepayment credit on
+ * an Account is drawn-down - Balance amounts first or Prepayment amounts first.
+ *
+ * #### Billing for Commitments
+ *
+ * If not all of an agreed Commitment amount is paid at the start of an end-customer contract
+ * period, you can choose one of two options for billing the outstanding fees due on the
+ * customer Account:
+ * - Select a Product *Plan to bill with*.
+ * - Define a *schedule of billing dates*.
+ */
override fun commitments(): CommitmentService = commitments
+ /**
+ * Endpoints for creating, retrieving, listing, and cancelling Bill Jobs.
+ *
+ * Bill Jobs are critical components in billing management, providing asynchronous mechanisms to
+ * calculate and handle bills.
+ *
+ * Bill Jobs give you the flexibiity to run Bills manually for Accounts to suit different
+ * billing management purposes. For example, some historical usage data has come in for an
+ * Account and you want to run a Bill for a specific date on that Account to check that the Bill
+ * is showing correctly for the charges due on the new usage data.
+ */
override fun billJobs(): BillJobService = billJobs
+ /**
+ * Endpoints for creating/updating/deleting Charges.
+ *
+ * Create Charges for your end-customer Accounts to create ad-hoc line items for Account
+ * billing. Charges are:
+ * * Created for either debit or credit amounts.
+ * * Linked to a Product for accounting purposes.
+ * * Optionally linked to a Contract.
+ * * Given a specific date for billing. When a bill job has run for the specified Charge bill
+ * date, a Charge appears as an Ad-hoc line item on the Bill.
+ * * Assigned a service period.
+ * * Available in any currency defined for your Organization. See
+ * [Creating Charges for Accounts](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-charges-for-accounts)
+ * in our main user documentation for more details.
+ *
+ * Alternatively, you can create a Charge for a Balance on an end-customer Account to create
+ * balance fee line items for Account billing. See
+ * [Creating Charges for Balances](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-balances-for-accounts/creating-charges-for-balances)
+ * in our main user documentation for more details.
+ */
override fun charges(): ChargeService = charges
+ /**
+ * Endpoints for Compound Aggregation related operations such as creation, update, list and
+ * delete.
+ *
+ * Use Compound Aggregations to create numerical measures from usage data by applying a
+ * calculation to one or more simple Aggregations or Custom Fields. These numerical measures can
+ * then be used as pricing metrics to price your Product Plans, enabling you to implement a wide
+ * range of usage-based pricing use cases.
+ *
+ * You can create two types of Compound Aggregation:
+ *
+ * **Global**
+ * - Pricing: Not tied to any specific product and can be used to price Plans belonging to any
+ * Product.
+ * - Calculation: can reference all simple Aggregations - both Global simple Aggregations and
+ * any product-specific simple Aggregations.
+ *
+ * **Product-specific**
+ * - Pricing: belong to a specific Product and can only be used to price Plans belonging to the
+ * same Product.
+ * - Calculation: can reference any simple Aggregations belonging to the same Product and any
+ * Global simple Aggregations.
+ *
+ * **IMPORTANT!** If a simple Aggregation referenced by a Compound Aggregation has a **Quantity
+ * per unit** defined or a **Rounding** defined, these will not be factored into the value used
+ * by the calculation. For example, if the simple Aggregation referenced has a base value of 100
+ * and has **Quantity per unit** set at 10, the Compound Aggregation calculation *will use the
+ * base value of 100 not 10*.
+ *
+ * To better understand and use Compound Aggregations, refer to the example
+ * [Compound Aggregation Use Case](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/compound-aggregations#example-use-case)
+ * in the m3ter documentation.
+ */
override fun compoundAggregations(): CompoundAggregationService = compoundAggregations
+ /**
+ * Endpoints for Contract related operations such as creation, update, list and delete.
+ *
+ * Contracts are created for Accounts, which are your end-user customers. Contracts can be used
+ * for:
+ * * **Accounts Reporting**. To serve your general accounting operations and processes, you can
+ * report on total Contract values for an Account.
+ * * **Contract Billing**. Various billing entities associated with an Account can be linked to
+ * Contracts on the Account to meet your specific Contract billing use cases.
+ */
override fun contracts(): ContractService = contracts
+ /**
+ * Endpoints for listing, creating, retrieving, updating, or deleting Counters.
+ *
+ * You can create Counters for your m3ter Organization, which can then be used as pricing
+ * metrics to apply a unit-based
+ * [CounterPricing](https://www.m3ter.com/docs/api#tag/CounterPricing) to Product Plans or Plan
+ * Templates for recurring subscription charges on Accounts.
+ *
+ * Counters can then be used to post
+ * [CounterAdjustments](https://www.m3ter.com/docs/api#tag/CounterAdjustments) on your
+ * end-customer Accounts.
+ *
+ * Accounts are then billed in accordance with the CounterPricing on Plans attached to the
+ * Accounts and for the actual Counter quantities Accounts subscribe to. See
+ * [Recurring Charges: Counters](https://www.m3ter.com/docs/guides/recurring-charges-counters)
+ * in our main user documentation for more details.
+ */
override fun counters(): CounterService = counters
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterAdjustments.
+ *
+ * If you attach a Plan to an Account which is priced using a Counter to apply unit-based
+ * pricing, you can then create CounterAdjustments for the Account using that Counter to ensure
+ * the Account is billed according to the number of Counter units the Account subscribes to in a
+ * given billing period.
+ *
+ * See
+ * [Understanding and Creating Counter Adjustments for Accounts](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counter-adjustments-for-accounts)
+ * for more information.
+ */
override fun counterAdjustments(): CounterAdjustmentService = counterAdjustments
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterPricing.
+ *
+ * Create the CounterPricing for a Plan/PlanTemplate using a Counter, and define a unit-based
+ * pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Creating Counters and Pricing Plans](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counters)
+ * for more information.
+ */
override fun counterPricings(): CounterPricingService = counterPricings
+ /**
+ * Endpoints for CreditReason operations such as creation, update, list, and delete.
+ *
+ * You can create CreditReasons for your Organization, and then use them when creating a credit
+ * line item on a bill, or applying a product credit to a bill. CreditReasons provide contextual
+ * information as to why a credit was applied.
+ */
override fun creditReasons(): CreditReasonService = creditReasons
+ /**
+ * Endpoints for Currency operations such as creation, update, list, and delete. Currencies are
+ * stored for your Organization, and can then be used to specify currencies on various entities
+ * such as plan groups and plan templates.
+ *
+ * **IMPORTANT!** The Currencies you want to use in your Organization must be created first.
+ *
+ * The currency you select for your Organization determines the billing currency and overrides
+ * any currency settings in your pricing Plans. For example, if the Organization currency is set
+ * to USD and a pricing Plan used for an Account is set to GBP, the bill for an Account using
+ * that Plan is calculated in GBP, and then each bill line item converted to USD amounts.
+ *
+ * Currency conversion rates are setup in the *OrganizationConfig*. For more details, see
+ * [Creating and Managing Currencies](https://www.m3ter.com/docs/guides/organization-and-access-management/viewing-and-editing-organization#creating-and-managing-currencies)
+ * in the m3ter Documentation.
+ */
override fun currencies(): CurrencyService = currencies
+ /**
+ * Endpoints for retrieving and updating Custom Fields at the Organization level for all
+ * entities that support them.
+ *
+ * Custom Fields in m3ter allow you to store custom data in the form of number or string values
+ * against m3ter entities in a way that does not directly affect the normal working operation of
+ * the m3ter platform. Having this capability to store data in a free-hand fashion can prove
+ * very useful in helping you to meet specific usage-based pricing and other operational
+ * business use cases.
+ *
+ * However, you can exploit the values stored on Custom Fields in a more direct way by
+ * referencing them in Derived Field and Compound Aggregation calculations. Given the key role
+ * these calculations can play when implementing usage-based pricing schema, any Custom Fields
+ * you reference will then affect how the platform behaves. Referencing Custom Field values in
+ * your calculations offers a much wider scope of options when it comes to resolving complex
+ * usage-based pricing use cases.
+ *
+ * Custom Fields can be added to the following entities at Organizational level:
+ * * Organization
+ * * Account
+ * * AccountPlan
+ * * Aggregation
+ * * Compound Aggregation
+ * * Meter
+ * * Product
+ * * Plan
+ * * PlanTemplate
+ * * Contract
+ *
+ * These all follow the same pattern - a new *(optional)* field is available on the entity
+ * request and response bodies called "customFields" which is a object in this format:
+ * ```
+ * "customFields": {
+ * "exampleCustomField1": 7.1,
+ * "exampleCustomField2": "stringValue"
+ * }
+ * ```
+ *
+ * The value for a Custom Field can be a string or a number.
+ *
+ * **Using Custom Field values in calculations:**
+ * - You can add Custom Fields at two levels - the Organization level and the individual entity
+ * level.
+ * - The Organizational level field provides a default value and *must be added* if you want to
+ * also add a Custom Field of the same name at the corresponding individual entity level. If
+ * you reference the Custom Field in a calculation, the value for the individual entity level
+ * field is used. If no field is defined at individual entity level, then the Organization
+ * level field value is used.
+ *
+ * **Important: Constraints and Exceptions!**
+ *
+ * **Custom Fields at Organization Level**. Currently, you cannot create Custom Fields at the
+ * Organization-level for the following enitites:
+ * * Plan Group
+ * * Balance
+ * * Balance Transaction Schedule
+ * * Balance Charge Schedule
+ *
+ * Therefore you cannot reference the Custom Fields values created at the individual entity
+ * level for these entities in your Derived Field or Compound Aggregation calculations.
+ *
+ * **Derived Field Calculations**. You can *only reference Custom Fields* for the following
+ * entities:
+ * * Organization
+ * * Meter
+ * * Account
+ *
+ * However, if you are using Meters belonging to *a specific Product*, that is, not *Global
+ * Meters*, you can also reference Custom Fields added to a Product in Derived Field
+ * calculations.
+ *
+ * **Compound Aggregation Calculations - Meter Custom Fields**. The value of the *Organization
+ * level Meter Custom Field will always be used*, even if you have defined a corresponding field
+ * at the individual Meter level.
+ *
+ * See
+ * [Working with Custom Fields](https://www.m3ter.com/docs/guides/creating-and-managing-products/working-with-custom-fields)
+ * in the m3ter documentation for more information.
+ */
override fun customFields(): CustomFieldService = customFields
+ /**
+ * Endpoints for triggering one-off, ad-hoc Data Exports. You can set up and run ad-hoc Exports
+ * to export two kinds of data from your m3ter Organization:
+ * * Usage data.
+ * * Operational data for entities.
+ *
+ * **Ad-Hoc Export Destinations** When setting up and running an ad-hoc Export:
+ * * You can define one or more Export Destinations - see the
+ * [ExportDestination](https://www.m3ter.com/docs/api#tag/ExportDestination) section of this
+ * API Reference. When the export runs, the data is sent through to the sepecified
+ * Destination. However, the export file is also made available for you to download it
+ * locally.
+ * * You can set up and run Data Exports without defining a Destination. The data is not
+ * exported but the compiled export file is made available for downloading locally.
+ * * For details on downloading an export file, see the
+ * [Get Data Export File Download URL](https://www.m3ter.com/docs/api#tag/ExportDestination/operation/GenerateDataExportFileDownloadUrl)
+ * endpoint in this API Reference.
+ *
+ * **Preview Version!** The Data Export feature is currently available only in Preview release
+ * version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Preview release definition. ExportAdHoc endpoints will only be available if Data Export
+ * has been enabled for your Organization. For more details see
+ * [Data Export(Preview)](https://www.m3ter.com/docs/guides/data-exports) in our main User
+ * documentation. If you're interested in previewing the Data Export feature, please get in
+ * touch with m3ter Support or your m3ter contact.
+ */
override fun dataExports(): DataExportService = dataExports
+ /**
+ * Endpoints for DebitReason operations such as creation, update, list, and delete.
+ *
+ * You can create DebitReasons for your Organization, and then use them when creating a debit
+ * line item on a bill, or applying a product debit to a bill. DebitReasons provide contextual
+ * information as to why a debit was applied.
+ */
override fun debitReasons(): DebitReasonService = debitReasons
+ /**
+ * This section provides Endpoints for operations that allow you to retrieve detailed
+ * information about individual Events, list all Events or specific Event Types, and explore
+ * dynamic fields available for each Event Type.
+ *
+ * Events encompass specific instances of state changes within the system, such as the creation
+ * of a new Prepayment/Commitment for an Account. Each Event is classified under an Event Type
+ * framework, providing context about what kind of change occurred to generate the Event.
+ *
+ * **Events for Configuration and Billing Entities**
+ *
+ * Many Event Types cover common configuration and billing objects, where the Event is generated
+ * for a state change of one of these objects - for when the configuration or billing object is
+ * **created**, **deleted**, or **updated**.
+ *
+ * For example:
+ * * configuration.commitment.created
+ * * configuration.commitment.deleted
+ * * configuration.commitment.updated
+ * * configuration.account.created
+ * * configuration.account.deleted
+ * * configuration.account.updated
+ * * billing.bill.created
+ * * billing.bill.deleted
+ * * billing.bill.created
+ *
+ * **Events for Errors or Failures**
+ *
+ * There are also Event Types for certain kinds of error that can occur:
+ * * For an Integration:
+ * * validation
+ * * authentication
+ * * perform
+ * * missing account mapping
+ * * disabled
+ * * For a Usage Data Ingest Submission:
+ * * validation failure
+ * * For Data Export Jobs:
+ * * data export job failure
+ *
+ * **Scheduled Events**
+ *
+ * In addition to system-generated Events that occur when a configuration entity undergoes a
+ * state change at creation, update, or deletion of the entity, you can use API calls to create
+ * and configure *Scheduled Event Configurations*. Scheduled Events are custom Event types,
+ * which you can set up by referencing Date/Time fields on configuration and billing entities.
+ * See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference for more details.
+ *
+ * **Notifications for Events**
+ *
+ * You can create Notification rules based on Events and these rules can reference and apply
+ * calculations to the Event's fields. This allows you to set up customized alerts to be sent
+ * out via webhooks when the Event occurs and any conditions you've built into the Notification
+ * rule's calculation are satisfied.
+ *
+ * See the [Notifications](https://www.m3ter.com/docs/api#tag/Notifications) section for more
+ * details.
+ *
+ * **Other Events**
+ *
+ * When Events occur, they can cause other Events, such as when a Notification is triggered by
+ * the Event it is based on. For these Events there are currently two categories:
+ * * Notification
+ * * IntegrationEvent
+ *
+ * Also see
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * and
+ * [Object Definitions and API Calls](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications/object-definitions-and-api-calls)
+ * in the m3ter documentation for more guidance.
+ */
override fun events(): EventService = events
+ /**
+ * Endpoints for managing External Mapping related operations such as creation, update, list and
+ * delete.
+ *
+ * When you integrate your 3rd-party systems with the m3ter platform, a mapping between entities
+ * in the local system *(m3ter)* and external systems is constructed. This *External Mapping* is
+ * crucial in scenarios where data from external systems is consumed or where data from the
+ * local system is to be synchronized with external systems.
+ *
+ * When you are working to set up your Integrations and want to test or troubleshoot your
+ * implementation before going live, you might need to create External Mappings manually and, at
+ * a later date, edit or delete them.
+ */
override fun externalMappings(): ExternalMappingService = externalMappings
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the m3ter
+ * platform. The integration endpoints in this section facilitate various operations such as
+ * creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing, billing
+ * and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
override fun integrationConfigurations(): IntegrationConfigurationService =
integrationConfigurations
+ /**
+ * Endpoints for creating/updating/deleting Lookup Tables.
+ *
+ * Lookup Tables enable you to manage dynamic data mappings that your calculations reference.
+ * Use them for currency conversion, pricing tiers, discount rates, and similar scenarios where
+ * you require values to change operationally but for calculation logic to remain constant.
+ *
+ * **Beta Version!** The Lookup Table feature is currently available in Beta release version.
+ * See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition. Lookup Table endpoints will only be available if Lookup Tables
+ * have been enabled for your Organization. For more details see
+ * [Lookup Tables (Beta)](https://www.m3ter.com/docs/guides/lookup-tables) in our main User
+ * documentation.
+ */
override fun lookupTables(): LookupTableService = lookupTables
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Meters.
+ *
+ * Use Meters to submit usage data for the consumption of your products and services by end
+ * customers. This usage data then becomes the basis for setting up usage-based pricing for your
+ * products and services.
+ *
+ * Examples of usage data collected in Meters:
+ * * Number of logins.
+ * * Duration of session.
+ * * Amount of data downloaded.
+ *
+ * To collect usage data and ingest it into the platform, you can define two types of fields for
+ * Meters:
+ * - `dataFields` Used to collect raw usage data measures - numeric quantitative data values or
+ * non-numeric point data values.
+ * - `derivedFields` Used to derive usage data measures that are the result of applying a
+ * calculation to `dataFields`, `customFields`, or system `Timestamp` fields.
+ *
+ * You can also:
+ * - Create `customFields` for a Meter, which allows you to attach custom data to the Meter as
+ * name/value pairs.
+ * - Create Global Meters, which are not tied to a specific Product and allow you to collect
+ * usage data that will form the basis of usage-based pricing across multiple Products.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally Identifiable
+ * Information (PII) in m3ter is restricted to a few fields on the **Account** entity. Please
+ * ensure that any fields you configure for Meters, such as Data Fields or Derived Fields, do
+ * not contain any end-customer PII data. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for more
+ * details.
+ *
+ * See also:
+ * - [Reviewing Meter
+ * Options](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/reviewing-meter-options).
+ */
override fun meters(): MeterService = meters
+ /**
+ * This section provides endpoints for managing Event Notifications.
+ *
+ * You can create Notifications based on system Events generated by the platform. When you base
+ * a Notification on a specific Event type, you can include a calculation that references the
+ * fields available on that Event type to define precise conditions that must be met for the
+ * Notification to be triggered when an Event of that type occurs. In this way, you can set up
+ * highly customized Notifications that act as timely alerts to inform you about significant
+ * occurrences within your Organization. For instance, if you provide a sign-up bonus to new
+ * end-customer Accounts, you can set up a Notification to alert you when an end-customer
+ * Account has used up a certain percentage of their bonus credit.
+ *
+ * You can also set up Notifications based on Scheduled Event types you've created for your
+ * Organization. See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference and
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our user documentation.
+ *
+ * For more details on Event types and their fields, see the
+ * [Events](https://www.m3ter.com/docs/api#tag/Events) section.
+ *
+ * For detailed guidance on working with Events and Notifications, refer to the
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * section of the m3ter user documentation.
+ */
override fun notificationConfigurations(): NotificationConfigurationService =
notificationConfigurations
+ /**
+ * Endpoints for retrieving or updating the Organization Config.
+ *
+ * Organization represents your company as a direct customer of m3ter. Use Organization
+ * configuration to define *Organization-wide* settings. For example:
+ * - Timezone.
+ * - Currencies and currency conversions.
+ * - Billing operations settings, such as:
+ * - Epoch dates to control first billing dates.
+ * - Whether to bill customer accounts in advance/in arrears for standing charge amounts,
+ * minimum spend amounts, and commitment fees.
+ *
+ * For other aspects of your Organization setup and configuration, see the following sections in
+ * this API Reference:
+ * * [Custom Fields](https://www.m3ter.com/docs/api#tag/CustomField)
+ * * [Currencies](https://www.m3ter.com/docs/api#tag/Currency)
+ * * [Credit Reasons](https://www.m3ter.com/docs/api#tag/CreditReason)
+ * * [Debit Reason](https://www.m3ter.com/docs/api#tag/DebitReason)
+ * * [Transaction Types](https://www.m3ter.com/docs/api#tag/TransactionType)
+ *
+ * See also:
+ * - [Managing your
+ * Organization](https://www.m3ter.com/docs/guides/managing-organization-and-users/viewing-and-editing-organization).
+ */
override fun organizationConfig(): OrganizationConfigService = organizationConfig
+ /**
+ * Endpoints for Permission Policy related operations such as creation, update, add and
+ * retrieve.
+ *
+ * Permission Policies can restrict or grant access to specific resources for both Users
+ * *(people)* and Service Users *(automated processes with direct API access)*. This enables you
+ * to control precisely what a User can do in your m3ter Organization.
+ *
+ * For more details, see
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/organization-and-access-management/creating-and-managing-permissions#permission-policy-statements---available-actions-and-resources)
+ * in our main Documentation.
+ */
override fun permissionPolicies(): PermissionPolicyService = permissionPolicies
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Plans.
+ *
+ * A Plan is based on a PlanTemplate and represents a specific pricing plan for one of your
+ * products or services. Each Plan inherits general billing attributes or pricing structure from
+ * its parent Plan Template. Some attributes can be overriden for the specific Plan.
+ *
+ * When you've created the Plan Templates and Plans you need for your Products, you can
+ * configure the exact pricing structures for Plans to charge customers that consume one or more
+ * of your Products.
+ *
+ * You can then attach the appropriately priced Plans to customer Accounts to create
+ * [Account Plans](https://www.m3ter.com/docs/api#tag/AccountPlan) and enable charges to be
+ * calculated correctly for billing against those Accounts.
+ *
+ * See also:
+ * - [Reviewing Options for Plans and Plan
+ * Templates](https://www.m3ter.com/docs/guides/working-with-plan-templates-and-plans/reviewing-configuration-options-for-plans-and-plan-templates).
+ */
override fun plans(): PlanService = plans
+ /**
+ * Endpoints for PlanGroup related operations such as creation, update, retrieve, list and
+ * delete.
+ *
+ * PlanGroups are constructs that group multiple plans together. This enables a unified approach
+ * to efficiently handle various uses cases across different plans. For example applying a
+ * minimum spend amount at billing, across several of your products or features that are each
+ * priced separately.
+ */
override fun planGroups(): PlanGroupService = planGroups
+ /**
+ * Endpoints for PlanGroupLink related operations such as creation, update, list and delete.
+ *
+ * PlanGroupLinks are the intersection table between a PlanGroup and its associated Plans. A
+ * PlanGroupLink is only created when at least 1 Plan is linked to a PlanGroup.
+ */
override fun planGroupLinks(): PlanGroupLinkService = planGroupLinks
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting PlanTemplates.
+ *
+ * Use PlanTemplates to define default values for Plans. These default values control the
+ * billing operations you want applied to your products. PlanTemplates avoid repetition in
+ * configuration work - many Plans will share settings for billing operations and differ only in
+ * the details of their pricing structures.
+ *
+ * A PlanTemplate is linked to a Product, and each Plan is a child of a PlanTemplate.
+ */
override fun planTemplates(): PlanTemplateService = planTemplates
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Pricing.
+ *
+ * Create the Pricing for a Plan/PlanTemplate with usage data Aggregations, and define a
+ * usage-based pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Reviewing Pricing Options for Plans and Plan Templates](https://www.m3ter.com/docs/guides/pricing-plans/reviewing-pricing-options-and-pricing-plans)
+ * for more information.
+ */
override fun pricings(): PricingService = pricings
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Products.
+ *
+ * A Product represents the products and services you offer to your end customers. Products act
+ * as a container for the Meters, Aggregations, Pricing, and Plans required to implement
+ * usage-based and other pricing models for your Organization.
+ */
override fun products(): ProductService = products
+ /**
+ * Endpoints for ResourceGroup related operations such as creation, update, list and delete.
+ *
+ * ResourceGroups are used in the context of Permission Policies, which controls what a User who
+ * has been given access to your Organization can and cannot do. For example, you might want to
+ * create a Permissions Policy that denies Users the ability to retrieve Meters.
+ *
+ * Resources are defined as m3ter Resource Identifiers *(MRIs)* in the format:
+ * ```
+ * service:resource-type/item-type/id
+ * ```
+ *
+ * Where:
+ * * service is a distinct part of the overall m3ter system, and which forms a natural
+ * functional grouping, such as "config" or "billing".
+ * * resource-type is the resource type item accessed - for example: "Plan", "Meter", "Bill"
+ * * item-type is one of:
+ * * "item" - to specify an individual item.
+ * * "group" - to specify a resource group.
+ * * id is the resource group id or the resource item id
+ *
+ * Resources can be assigned to one or more ResourceGroups. For example, a Plan can be assigned
+ * to Plan ResourceGroups, a Meter can be assigned to Meter ResourceGroups, and so on. This is
+ * useful for cases where you want to create Permission Policies which allow or deny access to a
+ * specific subset of resources. For example, grant a user access to only some of the Plans in
+ * your Organization.
+ *
+ * This concept of grouping resources applies to every resource in m3ter, including
+ * ResourceGroups themselves. This allows you to nest ResourceGroups to support hierarchies of
+ * groups.
+ *
+ * See
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/managing-organization-and-users/creating-and-managing-permissions)
+ * in the m3ter documentation for more information.
+ *
+ * **Note: User Resource Groups** You can create a User Resource Group to group resources of
+ * type = `user`. You can then retrieve a list of the User Resource Groups a user belongs to.
+ * For more details, see the
+ * [Retrieve OrgUser Groups](https://www.m3ter.com/docs/api#tag/OrgUsers/operation/GetOrgUserGroups)
+ * call in the OrgUsers section.
+ */
override fun resourceGroups(): ResourceGroupService = resourceGroups
+ /**
+ * Endpoints for retrieving and managing scheduled Events' configurations.
+ *
+ * Scheduled Event Configurations define custom Event types that reference Date/Time fields
+ * belonging to configuration and billing entities. They therefore provide you with an extra
+ * degree of flexibility over and above system-generated Events for setting up Notifications
+ * based on Events.
+ *
+ * For more details, see the
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our Documenation.
+ */
override fun scheduledEventConfigurations(): ScheduledEventConfigurationService =
scheduledEventConfigurations
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights into
+ * the consumption patterns and charges of your end-customer Accounts.
+ */
override fun statements(): StatementService = statements
+ /**
+ * Endpoints for TransactionType operations such as creation, update, list, retrieve, and
+ * delete.
+ *
+ * You can create TransactionTypes for your Organization, which can then be used when creating
+ * and updating Balances. Example TransactionTypes: "Balance Amount" or "Add Funds".
+ *
+ * For details on creating a Transaction amount for a Balance using a TransactionType you've
+ * created for your Organization, see the
+ * [Create Balance Transaction](https://www.m3ter.com/docs/api#tag/Balances/operation/PostBalanceTransaction)
+ * call in the [Balances](https://www.m3ter.com/docs/api#tag/Balances) section of this API
+ * Reference.
+ */
override fun transactionTypes(): TransactionTypeService = transactionTypes
override fun usage(): UsageService = usage
override fun users(): UserService = users
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the m3ter
+ * platform. The integration endpoints in this section facilitate various operations such as
+ * creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing, billing
+ * and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
override fun webhooks(): WebhookService = webhooks
override fun close() = clientOptions.close()
@@ -512,93 +1363,952 @@ class M3terClientImpl(private val clientOptions: ClientOptions) : M3terClient {
clientOptions.toBuilder().apply(modifier::accept).build()
)
+ /**
+ * Endpoint for retrieving a JSON Web Token (JWT) bearer token for a ServiceUser using the
+ * Client Credentials Grant flow.
+ *
+ * A ServiceUser represents the automated process you want to grant access to your
+ * Organization - that is, as an API user.
+ */
override fun authentication(): AuthenticationService.WithRawResponse = authentication
+ /**
+ * Endpoints for Account related operations such as creation, update, list and delete. An
+ * Account represents one of your end-customer accounts.
+ *
+ * Accounts do not belong to a Product to allow for cases where an end customer takes more
+ * than one of your Products, and the charges for these Products differ.
+ *
+ * You typically attach a priced Plan or Plan Template to an Account before you can generate
+ * bills for the Account:
+ * - If a customer consumes several of your Products, you can attach a priced Plan or Plan
+ * Template to the Account for charging against each Product.
+ * - If an Account is charged solely on the basis of an agreed Prepayment/Commitment amount
+ * but not all of the Prepayment is prepaid, you can use a customized billing schedule for
+ * outstanding fees without having to attach a Plan to the Account to generate Bills.
+ *
+ * You can create Child Accounts for end customers who hold multiple Accounts with you. You
+ * can then set up billing for the Parent/Child Account usage to have the end-customer
+ * billed once for the Parent Account, instead of having separate bills issued for usage
+ * against each of their multiple Accounts.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally
+ * Identifiable Information (PII) in m3ter is restricted to a few fields on the **Account**
+ * entity. Please ensure that only the ``name``, ``address``, or ``emailAddress`` fields
+ * contain any end-customer PII data on any Accounts you create. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for
+ * more details.
+ */
override fun accounts(): AccountService.WithRawResponse = accounts
+ /**
+ * Endpoints for AccountPlan and AccountPlanGroup related operations such as creation,
+ * update, list and delete.
+ *
+ * **AccountPlans** An Account represents one of your end-customer accounts. To create an
+ * AccountPlan, you attach a Product Plan to an Account. The AccountPlan then determines the
+ * charges incurred at billing by your end customer for consuming the Product the Plan is
+ * for:
+ * * **AccountPlan Active/Inactive**. Set start and end dates to define the period the
+ * AccountPlan is active for the Account.
+ * * **AccountPlan per Product**. If an end customer consumes multiple Products, create
+ * separate AccountPlans to charge for each Product.
+ *
+ * **AccountPlan Constraints:**
+ * * Only one AccountPlan per Product can be active at any one time for an Account.
+ * * If you create a Plan as a custom Plan for a specific Account, you can only use it to
+ * create an AccountPlan for that Account.
+ *
+ * **AccountPlanGroups** Plan Groups are used when you want to apply a minimum spend amount
+ * at billing across several of your Products each of which are priced separately - when you
+ * create the Plan Group, you define an overall minimum spend and then add any priced Plans
+ * you want to include in the Group. To create an AccounPlanGroup, you can attach a Plan
+ * Group to an Account that consumes the separate Products which are priced using the
+ * included Plans. At billing, the minimum spend you've defined for the Plan Group is
+ * applied:
+ * * **Active AccountPlanGroup**. Set the start and end dates to define the period for which
+ * the Plan Group will be active for the Account.
+ *
+ * **Plan Group Notes:**
+ * * You can only add *one Plan for the same Product* to a Plan Group. See the
+ * [Plan Group](https://www.m3ter.com/docs/api#tag/PlanGroup) in this API Reference for
+ * more details on creating Plan Groups.
+ * * You can create a *custom Plan Group* for an Account, which means the Plan Group can
+ * only be attached to that Account to create an AccountPlanGroup.
+ *
+ * **AcountPlanGroup - Notes and Constraints:**
+ * * **AccountPlanGroup is type of AccountPlan** When you attach a Plan Group to an Account,
+ * this creates an AccountPlanGroup. However, the m3ter data model *does not support a
+ * separate AccountPlanGroup entity*, and an AccountPlanGroup is a type of AccountPlan
+ * where a `planGroupId` is used instead of a `planId` when it's created. See the
+ * [Create AccountPlan](https://www.m3ter.com/docs/api#tag/AccountPlan/operation/PostAccountPlan)
+ * call in this section and
+ * [Attaching Plan Groups to an Account](https://www.m3ter.com/docs/guides/end-customer-accounts/attaching-plan-groups-to-an-account)
+ * in our main User Documentation.
+ * * **Multiple AccountPlan Groups:** You can attach more than one Plan Group to an Account
+ * to create multiple AccountPlanGroups, but the rule that *only one attached Plan per
+ * Product can be active at any one time for an Account* is preserved:
+ * * Multiple attached Plan Groups on an Account can have overlapping dates only if none
+ * of the Plan Groups contain a Plan belonging to the same Product. If you try to
+ * attach a Plan Group to an Account with Plan Groups already attached and:
+ * * The new Plan Group contains a Product Plan that also belongs to a Plan Group
+ * already attached to the Account.
+ * * The dates for these "matched Plan" Plan Groups being active for the Account
+ * would overlap.
+ * * Then you'll receive an error and the attachment will be blocked.
+ */
override fun accountPlans(): AccountPlanService.WithRawResponse = accountPlans
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Aggregations.
+ *
+ * An Aggregation links to a Meter and targets a Data Field or Derived Field on the Meter.
+ * You define the method of aggregation used to convert the usage data collected by the
+ * targeted Meter field into a numerical unit of measurement.
+ *
+ * You can then use the unit of measurement an Aggregation yields as a metric for pricing
+ * Product Plans and apply usage-based pricing to your products and services. You might also
+ * want to aggregate raw data measures for other purposes, such as to feed into analytical
+ * or business performance tools.
+ *
+ * **Notes:**
+ * * **Contrast with Compound Aggregations**. Standard or simple Aggregations of this type,
+ * which apply an aggregation method directly to Meter usage data fields, are contrasted
+ * with [Compound Aggregations](https://www.m3ter.com/docs/api#tag/CompoundAggregation). A
+ * Compound Aggregation typically references one or more simple Aggregations and applies a
+ * calculation to them to derive pricing metrics needed to serve more complex usage-based
+ * pricing scenarios.
+ * * **Segmented Aggregations**. Segmented Aggregations allow you to segment the usage data
+ * collected by a single Meter. This capability is very useful for implementing some
+ * pricing and billing use cases. See
+ * [Segmented Aggregations](https://www.m3ter.com/docs/guides/usage-data-aggregations/segmented-aggregations)
+ * in our main documentation for more details.
+ */
override fun aggregations(): AggregationService.WithRawResponse = aggregations
+ /**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative
+ * Transaction amounts for the Balance. To do this, you must first define Transaction Types
+ * for your Organization, and then use one of these Transaction Types when you add a
+ * specific Transaction to a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their
+ * Account, which can then be draw-down against charges due for product or service
+ * consumption. You can include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an
+ * initial free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This
+ * acts as an initial commitment, which allows them to use the service and gain an
+ * accurate insight into their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to
+ * subsequent Bills as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have
+ * agreed to pay for consuming your product or services across a full contract term. A
+ * customer might pay the entire or only part of the agreed amount upfront, but ***the
+ * commitment or prepayment amount is payable regardless of the actual usage by the customer
+ * of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used
+ * when a customer wants to add a credit amount to their Account at any time during the
+ * service period or when you as service provider want to add a credit to a customer
+ * Account. This Balance credit can then be drawn-down against for billing the Account for
+ * usage, minimum spend, standing charges, or recurring charges due. Balances therefore
+ * serve payment use cases in a more flexible way, for example to be used for a "Free
+ * Credit" sign-up scheme you offer to encourage sales or to enhance customer satisfaction
+ * by adding credit to an Account to compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Commitment credit
+ * on an Account is drawn-down - Balance amounts first or Commitment/Prepayment amounts
+ * first.
+ */
override fun balances(): BalanceService.WithRawResponse = balances
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights
+ * into the consumption patterns and charges of your end-customer Accounts.
+ */
override fun bills(): BillService.WithRawResponse = bills
+ /**
+ * Endpoints for updating and retreiving the Bill Configuration for an Organization. The
+ * Organization represents your company as a direct customer of the m3ter service.
+ *
+ * You can use the **Update BillConfig** endpoint to set a global lock date for **all**
+ * Bills - any Bill with a service period end date on or before the set date will be locked
+ * and cannot be updated.
+ *
+ * **Warning: Ensure all Bills are Approved!** If you try to set a global lock date when
+ * there remains Bills in a *Pending* state whose service period end date is on or before
+ * the specified lock date, then you'll receive an error.
+ */
override fun billConfig(): BillConfigService.WithRawResponse = billConfig
+ /**
+ * Endpoints that manage Commitments *(also known as Prepayments)* in the context of
+ * usage-based pricing and billing. A Commitment represents an agreement where the
+ * end-customer has agreed to pay a fixed minimum amount throughout the contract period.
+ * ***The commitment amount is payable regardless of the actual usage by the customer of
+ * your service or product.***
+ *
+ * These endpoints enable the creation, updating, retrieval, and deletion of Commitments.
+ * Use them to manage your customer's Commitments and ensure optimal revenue recognition:
+ * * Specify which type of charges can draw-down against a Commitment amount on an Account
+ * at billing: usage, minimum spend, standing charges, or recurring charges.
+ * * Define overage surcharge percentages, which are applied when the usage charges exceed
+ * the agreed Commitment amount within the contract duration.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments/Prepayments are used for amounts end-customers have agreed to pay for
+ * consuming your product or services across a full contract term. A customer might pay the
+ * entire or only part of the agreed amount upfront, but ***the prepayment amount is payable
+ * regardless of the actual usage by the customer of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used
+ * when a customer wants to add a credit amount to their Account at any time during the
+ * service period or when you as service provider want to add a credit to a customer
+ * Account. This Balance credit can then be drawn-down against for billing the Account for
+ * usage, minimum spend, standing charges, or recurring charges due. Balances therefore
+ * serve payment use cases in a more flexible way, for example to be used for a "Free
+ * Credit" sign-up scheme you offer to encourage sales or to enhance customer satisfaction
+ * by adding credit to an Account to compensate for service delivery issues.
+ *
+ * You can use Prepayments/Commitments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Prepayment credit
+ * on an Account is drawn-down - Balance amounts first or Prepayment amounts first.
+ *
+ * #### Billing for Commitments
+ *
+ * If not all of an agreed Commitment amount is paid at the start of an end-customer
+ * contract period, you can choose one of two options for billing the outstanding fees due
+ * on the customer Account:
+ * - Select a Product *Plan to bill with*.
+ * - Define a *schedule of billing dates*.
+ */
override fun commitments(): CommitmentService.WithRawResponse = commitments
+ /**
+ * Endpoints for creating, retrieving, listing, and cancelling Bill Jobs.
+ *
+ * Bill Jobs are critical components in billing management, providing asynchronous
+ * mechanisms to calculate and handle bills.
+ *
+ * Bill Jobs give you the flexibiity to run Bills manually for Accounts to suit different
+ * billing management purposes. For example, some historical usage data has come in for an
+ * Account and you want to run a Bill for a specific date on that Account to check that the
+ * Bill is showing correctly for the charges due on the new usage data.
+ */
override fun billJobs(): BillJobService.WithRawResponse = billJobs
+ /**
+ * Endpoints for creating/updating/deleting Charges.
+ *
+ * Create Charges for your end-customer Accounts to create ad-hoc line items for Account
+ * billing. Charges are:
+ * * Created for either debit or credit amounts.
+ * * Linked to a Product for accounting purposes.
+ * * Optionally linked to a Contract.
+ * * Given a specific date for billing. When a bill job has run for the specified Charge
+ * bill date, a Charge appears as an Ad-hoc line item on the Bill.
+ * * Assigned a service period.
+ * * Available in any currency defined for your Organization. See
+ * [Creating Charges for Accounts](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-charges-for-accounts)
+ * in our main user documentation for more details.
+ *
+ * Alternatively, you can create a Charge for a Balance on an end-customer Account to create
+ * balance fee line items for Account billing. See
+ * [Creating Charges for Balances](https://www.m3ter.com/docs/guides/end-customer-accounts/creating-balances-for-accounts/creating-charges-for-balances)
+ * in our main user documentation for more details.
+ */
override fun charges(): ChargeService.WithRawResponse = charges
+ /**
+ * Endpoints for Compound Aggregation related operations such as creation, update, list and
+ * delete.
+ *
+ * Use Compound Aggregations to create numerical measures from usage data by applying a
+ * calculation to one or more simple Aggregations or Custom Fields. These numerical measures
+ * can then be used as pricing metrics to price your Product Plans, enabling you to
+ * implement a wide range of usage-based pricing use cases.
+ *
+ * You can create two types of Compound Aggregation:
+ *
+ * **Global**
+ * - Pricing: Not tied to any specific product and can be used to price Plans belonging to
+ * any Product.
+ * - Calculation: can reference all simple Aggregations - both Global simple Aggregations
+ * and any product-specific simple Aggregations.
+ *
+ * **Product-specific**
+ * - Pricing: belong to a specific Product and can only be used to price Plans belonging to
+ * the same Product.
+ * - Calculation: can reference any simple Aggregations belonging to the same Product and
+ * any Global simple Aggregations.
+ *
+ * **IMPORTANT!** If a simple Aggregation referenced by a Compound Aggregation has a
+ * **Quantity per unit** defined or a **Rounding** defined, these will not be factored into
+ * the value used by the calculation. For example, if the simple Aggregation referenced has
+ * a base value of 100 and has **Quantity per unit** set at 10, the Compound Aggregation
+ * calculation *will use the base value of 100 not 10*.
+ *
+ * To better understand and use Compound Aggregations, refer to the example
+ * [Compound Aggregation Use Case](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/compound-aggregations#example-use-case)
+ * in the m3ter documentation.
+ */
override fun compoundAggregations(): CompoundAggregationService.WithRawResponse =
compoundAggregations
+ /**
+ * Endpoints for Contract related operations such as creation, update, list and delete.
+ *
+ * Contracts are created for Accounts, which are your end-user customers. Contracts can be
+ * used for:
+ * * **Accounts Reporting**. To serve your general accounting operations and processes, you
+ * can report on total Contract values for an Account.
+ * * **Contract Billing**. Various billing entities associated with an Account can be linked
+ * to Contracts on the Account to meet your specific Contract billing use cases.
+ */
override fun contracts(): ContractService.WithRawResponse = contracts
+ /**
+ * Endpoints for listing, creating, retrieving, updating, or deleting Counters.
+ *
+ * You can create Counters for your m3ter Organization, which can then be used as pricing
+ * metrics to apply a unit-based
+ * [CounterPricing](https://www.m3ter.com/docs/api#tag/CounterPricing) to Product Plans or
+ * Plan Templates for recurring subscription charges on Accounts.
+ *
+ * Counters can then be used to post
+ * [CounterAdjustments](https://www.m3ter.com/docs/api#tag/CounterAdjustments) on your
+ * end-customer Accounts.
+ *
+ * Accounts are then billed in accordance with the CounterPricing on Plans attached to the
+ * Accounts and for the actual Counter quantities Accounts subscribe to. See
+ * [Recurring Charges: Counters](https://www.m3ter.com/docs/guides/recurring-charges-counters)
+ * in our main user documentation for more details.
+ */
override fun counters(): CounterService.WithRawResponse = counters
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterAdjustments.
+ *
+ * If you attach a Plan to an Account which is priced using a Counter to apply unit-based
+ * pricing, you can then create CounterAdjustments for the Account using that Counter to
+ * ensure the Account is billed according to the number of Counter units the Account
+ * subscribes to in a given billing period.
+ *
+ * See
+ * [Understanding and Creating Counter Adjustments for Accounts](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counter-adjustments-for-accounts)
+ * for more information.
+ */
override fun counterAdjustments(): CounterAdjustmentService.WithRawResponse =
counterAdjustments
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting CounterPricing.
+ *
+ * Create the CounterPricing for a Plan/PlanTemplate using a Counter, and define a
+ * unit-based pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Creating Counters and Pricing Plans](https://www.m3ter.com/docs/guides/recurring-charges-counters/creating-counters)
+ * for more information.
+ */
override fun counterPricings(): CounterPricingService.WithRawResponse = counterPricings
+ /**
+ * Endpoints for CreditReason operations such as creation, update, list, and delete.
+ *
+ * You can create CreditReasons for your Organization, and then use them when creating a
+ * credit line item on a bill, or applying a product credit to a bill. CreditReasons provide
+ * contextual information as to why a credit was applied.
+ */
override fun creditReasons(): CreditReasonService.WithRawResponse = creditReasons
+ /**
+ * Endpoints for Currency operations such as creation, update, list, and delete. Currencies
+ * are stored for your Organization, and can then be used to specify currencies on various
+ * entities such as plan groups and plan templates.
+ *
+ * **IMPORTANT!** The Currencies you want to use in your Organization must be created first.
+ *
+ * The currency you select for your Organization determines the billing currency and
+ * overrides any currency settings in your pricing Plans. For example, if the Organization
+ * currency is set to USD and a pricing Plan used for an Account is set to GBP, the bill for
+ * an Account using that Plan is calculated in GBP, and then each bill line item converted
+ * to USD amounts.
+ *
+ * Currency conversion rates are setup in the *OrganizationConfig*. For more details, see
+ * [Creating and Managing Currencies](https://www.m3ter.com/docs/guides/organization-and-access-management/viewing-and-editing-organization#creating-and-managing-currencies)
+ * in the m3ter Documentation.
+ */
override fun currencies(): CurrencyService.WithRawResponse = currencies
+ /**
+ * Endpoints for retrieving and updating Custom Fields at the Organization level for all
+ * entities that support them.
+ *
+ * Custom Fields in m3ter allow you to store custom data in the form of number or string
+ * values against m3ter entities in a way that does not directly affect the normal working
+ * operation of the m3ter platform. Having this capability to store data in a free-hand
+ * fashion can prove very useful in helping you to meet specific usage-based pricing and
+ * other operational business use cases.
+ *
+ * However, you can exploit the values stored on Custom Fields in a more direct way by
+ * referencing them in Derived Field and Compound Aggregation calculations. Given the key
+ * role these calculations can play when implementing usage-based pricing schema, any Custom
+ * Fields you reference will then affect how the platform behaves. Referencing Custom Field
+ * values in your calculations offers a much wider scope of options when it comes to
+ * resolving complex usage-based pricing use cases.
+ *
+ * Custom Fields can be added to the following entities at Organizational level:
+ * * Organization
+ * * Account
+ * * AccountPlan
+ * * Aggregation
+ * * Compound Aggregation
+ * * Meter
+ * * Product
+ * * Plan
+ * * PlanTemplate
+ * * Contract
+ *
+ * These all follow the same pattern - a new *(optional)* field is available on the entity
+ * request and response bodies called "customFields" which is a object in this format:
+ * ```
+ * "customFields": {
+ * "exampleCustomField1": 7.1,
+ * "exampleCustomField2": "stringValue"
+ * }
+ * ```
+ *
+ * The value for a Custom Field can be a string or a number.
+ *
+ * **Using Custom Field values in calculations:**
+ * - You can add Custom Fields at two levels - the Organization level and the individual
+ * entity level.
+ * - The Organizational level field provides a default value and *must be added* if you want
+ * to also add a Custom Field of the same name at the corresponding individual entity
+ * level. If you reference the Custom Field in a calculation, the value for the individual
+ * entity level field is used. If no field is defined at individual entity level, then the
+ * Organization level field value is used.
+ *
+ * **Important: Constraints and Exceptions!**
+ *
+ * **Custom Fields at Organization Level**. Currently, you cannot create Custom Fields at
+ * the Organization-level for the following enitites:
+ * * Plan Group
+ * * Balance
+ * * Balance Transaction Schedule
+ * * Balance Charge Schedule
+ *
+ * Therefore you cannot reference the Custom Fields values created at the individual entity
+ * level for these entities in your Derived Field or Compound Aggregation calculations.
+ *
+ * **Derived Field Calculations**. You can *only reference Custom Fields* for the following
+ * entities:
+ * * Organization
+ * * Meter
+ * * Account
+ *
+ * However, if you are using Meters belonging to *a specific Product*, that is, not *Global
+ * Meters*, you can also reference Custom Fields added to a Product in Derived Field
+ * calculations.
+ *
+ * **Compound Aggregation Calculations - Meter Custom Fields**. The value of the
+ * *Organization level Meter Custom Field will always be used*, even if you have defined a
+ * corresponding field at the individual Meter level.
+ *
+ * See
+ * [Working with Custom Fields](https://www.m3ter.com/docs/guides/creating-and-managing-products/working-with-custom-fields)
+ * in the m3ter documentation for more information.
+ */
override fun customFields(): CustomFieldService.WithRawResponse = customFields
+ /**
+ * Endpoints for triggering one-off, ad-hoc Data Exports. You can set up and run ad-hoc
+ * Exports to export two kinds of data from your m3ter Organization:
+ * * Usage data.
+ * * Operational data for entities.
+ *
+ * **Ad-Hoc Export Destinations** When setting up and running an ad-hoc Export:
+ * * You can define one or more Export Destinations - see the
+ * [ExportDestination](https://www.m3ter.com/docs/api#tag/ExportDestination) section of
+ * this API Reference. When the export runs, the data is sent through to the sepecified
+ * Destination. However, the export file is also made available for you to download it
+ * locally.
+ * * You can set up and run Data Exports without defining a Destination. The data is not
+ * exported but the compiled export file is made available for downloading locally.
+ * * For details on downloading an export file, see the
+ * [Get Data Export File Download URL](https://www.m3ter.com/docs/api#tag/ExportDestination/operation/GenerateDataExportFileDownloadUrl)
+ * endpoint in this API Reference.
+ *
+ * **Preview Version!** The Data Export feature is currently available only in Preview
+ * release version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Preview release definition. ExportAdHoc endpoints will only be available if Data
+ * Export has been enabled for your Organization. For more details see
+ * [Data Export(Preview)](https://www.m3ter.com/docs/guides/data-exports) in our main User
+ * documentation. If you're interested in previewing the Data Export feature, please get in
+ * touch with m3ter Support or your m3ter contact.
+ */
override fun dataExports(): DataExportService.WithRawResponse = dataExports
+ /**
+ * Endpoints for DebitReason operations such as creation, update, list, and delete.
+ *
+ * You can create DebitReasons for your Organization, and then use them when creating a
+ * debit line item on a bill, or applying a product debit to a bill. DebitReasons provide
+ * contextual information as to why a debit was applied.
+ */
override fun debitReasons(): DebitReasonService.WithRawResponse = debitReasons
+ /**
+ * This section provides Endpoints for operations that allow you to retrieve detailed
+ * information about individual Events, list all Events or specific Event Types, and explore
+ * dynamic fields available for each Event Type.
+ *
+ * Events encompass specific instances of state changes within the system, such as the
+ * creation of a new Prepayment/Commitment for an Account. Each Event is classified under an
+ * Event Type framework, providing context about what kind of change occurred to generate
+ * the Event.
+ *
+ * **Events for Configuration and Billing Entities**
+ *
+ * Many Event Types cover common configuration and billing objects, where the Event is
+ * generated for a state change of one of these objects - for when the configuration or
+ * billing object is **created**, **deleted**, or **updated**.
+ *
+ * For example:
+ * * configuration.commitment.created
+ * * configuration.commitment.deleted
+ * * configuration.commitment.updated
+ * * configuration.account.created
+ * * configuration.account.deleted
+ * * configuration.account.updated
+ * * billing.bill.created
+ * * billing.bill.deleted
+ * * billing.bill.created
+ *
+ * **Events for Errors or Failures**
+ *
+ * There are also Event Types for certain kinds of error that can occur:
+ * * For an Integration:
+ * * validation
+ * * authentication
+ * * perform
+ * * missing account mapping
+ * * disabled
+ * * For a Usage Data Ingest Submission:
+ * * validation failure
+ * * For Data Export Jobs:
+ * * data export job failure
+ *
+ * **Scheduled Events**
+ *
+ * In addition to system-generated Events that occur when a configuration entity undergoes a
+ * state change at creation, update, or deletion of the entity, you can use API calls to
+ * create and configure *Scheduled Event Configurations*. Scheduled Events are custom Event
+ * types, which you can set up by referencing Date/Time fields on configuration and billing
+ * entities. See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference for more details.
+ *
+ * **Notifications for Events**
+ *
+ * You can create Notification rules based on Events and these rules can reference and apply
+ * calculations to the Event's fields. This allows you to set up customized alerts to be
+ * sent out via webhooks when the Event occurs and any conditions you've built into the
+ * Notification rule's calculation are satisfied.
+ *
+ * See the [Notifications](https://www.m3ter.com/docs/api#tag/Notifications) section for
+ * more details.
+ *
+ * **Other Events**
+ *
+ * When Events occur, they can cause other Events, such as when a Notification is triggered
+ * by the Event it is based on. For these Events there are currently two categories:
+ * * Notification
+ * * IntegrationEvent
+ *
+ * Also see
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * and
+ * [Object Definitions and API Calls](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications/object-definitions-and-api-calls)
+ * in the m3ter documentation for more guidance.
+ */
override fun events(): EventService.WithRawResponse = events
+ /**
+ * Endpoints for managing External Mapping related operations such as creation, update, list
+ * and delete.
+ *
+ * When you integrate your 3rd-party systems with the m3ter platform, a mapping between
+ * entities in the local system *(m3ter)* and external systems is constructed. This
+ * *External Mapping* is crucial in scenarios where data from external systems is consumed
+ * or where data from the local system is to be synchronized with external systems.
+ *
+ * When you are working to set up your Integrations and want to test or troubleshoot your
+ * implementation before going live, you might need to create External Mappings manually
+ * and, at a later date, edit or delete them.
+ */
override fun externalMappings(): ExternalMappingService.WithRawResponse = externalMappings
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the
+ * m3ter platform. The integration endpoints in this section facilitate various operations
+ * such as creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing,
+ * billing and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
override fun integrationConfigurations(): IntegrationConfigurationService.WithRawResponse =
integrationConfigurations
+ /**
+ * Endpoints for creating/updating/deleting Lookup Tables.
+ *
+ * Lookup Tables enable you to manage dynamic data mappings that your calculations
+ * reference. Use them for currency conversion, pricing tiers, discount rates, and similar
+ * scenarios where you require values to change operationally but for calculation logic to
+ * remain constant.
+ *
+ * **Beta Version!** The Lookup Table feature is currently available in Beta release
+ * version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition. Lookup Table endpoints will only be available if Lookup
+ * Tables have been enabled for your Organization. For more details see
+ * [Lookup Tables (Beta)](https://www.m3ter.com/docs/guides/lookup-tables) in our main User
+ * documentation.
+ */
override fun lookupTables(): LookupTableService.WithRawResponse = lookupTables
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Meters.
+ *
+ * Use Meters to submit usage data for the consumption of your products and services by end
+ * customers. This usage data then becomes the basis for setting up usage-based pricing for
+ * your products and services.
+ *
+ * Examples of usage data collected in Meters:
+ * * Number of logins.
+ * * Duration of session.
+ * * Amount of data downloaded.
+ *
+ * To collect usage data and ingest it into the platform, you can define two types of fields
+ * for Meters:
+ * - `dataFields` Used to collect raw usage data measures - numeric quantitative data values
+ * or non-numeric point data values.
+ * - `derivedFields` Used to derive usage data measures that are the result of applying a
+ * calculation to `dataFields`, `customFields`, or system `Timestamp` fields.
+ *
+ * You can also:
+ * - Create `customFields` for a Meter, which allows you to attach custom data to the Meter
+ * as name/value pairs.
+ * - Create Global Meters, which are not tied to a specific Product and allow you to collect
+ * usage data that will form the basis of usage-based pricing across multiple Products.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally
+ * Identifiable Information (PII) in m3ter is restricted to a few fields on the **Account**
+ * entity. Please ensure that any fields you configure for Meters, such as Data Fields or
+ * Derived Fields, do not contain any end-customer PII data. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for
+ * more details.
+ *
+ * See also:
+ * - [Reviewing Meter
+ * Options](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/reviewing-meter-options).
+ */
override fun meters(): MeterService.WithRawResponse = meters
+ /**
+ * This section provides endpoints for managing Event Notifications.
+ *
+ * You can create Notifications based on system Events generated by the platform. When you
+ * base a Notification on a specific Event type, you can include a calculation that
+ * references the fields available on that Event type to define precise conditions that must
+ * be met for the Notification to be triggered when an Event of that type occurs. In this
+ * way, you can set up highly customized Notifications that act as timely alerts to inform
+ * you about significant occurrences within your Organization. For instance, if you provide
+ * a sign-up bonus to new end-customer Accounts, you can set up a Notification to alert you
+ * when an end-customer Account has used up a certain percentage of their bonus credit.
+ *
+ * You can also set up Notifications based on Scheduled Event types you've created for your
+ * Organization. See the
+ * [ScheduledEventConfigurations](https://www.m3ter.com/docs/api#tag/ScheduledEventConfigurations)
+ * section of this API Reference and
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our user documentation.
+ *
+ * For more details on Event types and their fields, see the
+ * [Events](https://www.m3ter.com/docs/api#tag/Events) section.
+ *
+ * For detailed guidance on working with Events and Notifications, refer to the
+ * [Utilizing Events and Notifications](https://www.m3ter.com/docs/guides/utilizing-events-and-notifications)
+ * section of the m3ter user documentation.
+ */
override fun notificationConfigurations():
NotificationConfigurationService.WithRawResponse = notificationConfigurations
+ /**
+ * Endpoints for retrieving or updating the Organization Config.
+ *
+ * Organization represents your company as a direct customer of m3ter. Use Organization
+ * configuration to define *Organization-wide* settings. For example:
+ * - Timezone.
+ * - Currencies and currency conversions.
+ * - Billing operations settings, such as:
+ * - Epoch dates to control first billing dates.
+ * - Whether to bill customer accounts in advance/in arrears for standing charge
+ * amounts, minimum spend amounts, and commitment fees.
+ *
+ * For other aspects of your Organization setup and configuration, see the following
+ * sections in this API Reference:
+ * * [Custom Fields](https://www.m3ter.com/docs/api#tag/CustomField)
+ * * [Currencies](https://www.m3ter.com/docs/api#tag/Currency)
+ * * [Credit Reasons](https://www.m3ter.com/docs/api#tag/CreditReason)
+ * * [Debit Reason](https://www.m3ter.com/docs/api#tag/DebitReason)
+ * * [Transaction Types](https://www.m3ter.com/docs/api#tag/TransactionType)
+ *
+ * See also:
+ * - [Managing your
+ * Organization](https://www.m3ter.com/docs/guides/managing-organization-and-users/viewing-and-editing-organization).
+ */
override fun organizationConfig(): OrganizationConfigService.WithRawResponse =
organizationConfig
+ /**
+ * Endpoints for Permission Policy related operations such as creation, update, add and
+ * retrieve.
+ *
+ * Permission Policies can restrict or grant access to specific resources for both Users
+ * *(people)* and Service Users *(automated processes with direct API access)*. This enables
+ * you to control precisely what a User can do in your m3ter Organization.
+ *
+ * For more details, see
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/organization-and-access-management/creating-and-managing-permissions#permission-policy-statements---available-actions-and-resources)
+ * in our main Documentation.
+ */
override fun permissionPolicies(): PermissionPolicyService.WithRawResponse =
permissionPolicies
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Plans.
+ *
+ * A Plan is based on a PlanTemplate and represents a specific pricing plan for one of your
+ * products or services. Each Plan inherits general billing attributes or pricing structure
+ * from its parent Plan Template. Some attributes can be overriden for the specific Plan.
+ *
+ * When you've created the Plan Templates and Plans you need for your Products, you can
+ * configure the exact pricing structures for Plans to charge customers that consume one or
+ * more of your Products.
+ *
+ * You can then attach the appropriately priced Plans to customer Accounts to create
+ * [Account Plans](https://www.m3ter.com/docs/api#tag/AccountPlan) and enable charges to be
+ * calculated correctly for billing against those Accounts.
+ *
+ * See also:
+ * - [Reviewing Options for Plans and Plan
+ * Templates](https://www.m3ter.com/docs/guides/working-with-plan-templates-and-plans/reviewing-configuration-options-for-plans-and-plan-templates).
+ */
override fun plans(): PlanService.WithRawResponse = plans
+ /**
+ * Endpoints for PlanGroup related operations such as creation, update, retrieve, list and
+ * delete.
+ *
+ * PlanGroups are constructs that group multiple plans together. This enables a unified
+ * approach to efficiently handle various uses cases across different plans. For example
+ * applying a minimum spend amount at billing, across several of your products or features
+ * that are each priced separately.
+ */
override fun planGroups(): PlanGroupService.WithRawResponse = planGroups
+ /**
+ * Endpoints for PlanGroupLink related operations such as creation, update, list and delete.
+ *
+ * PlanGroupLinks are the intersection table between a PlanGroup and its associated Plans. A
+ * PlanGroupLink is only created when at least 1 Plan is linked to a PlanGroup.
+ */
override fun planGroupLinks(): PlanGroupLinkService.WithRawResponse = planGroupLinks
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting PlanTemplates.
+ *
+ * Use PlanTemplates to define default values for Plans. These default values control the
+ * billing operations you want applied to your products. PlanTemplates avoid repetition in
+ * configuration work - many Plans will share settings for billing operations and differ
+ * only in the details of their pricing structures.
+ *
+ * A PlanTemplate is linked to a Product, and each Plan is a child of a PlanTemplate.
+ */
override fun planTemplates(): PlanTemplateService.WithRawResponse = planTemplates
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Pricing.
+ *
+ * Create the Pricing for a Plan/PlanTemplate with usage data Aggregations, and define a
+ * usage-based pricing structure for charging end customer Accounts put on the Plan.
+ *
+ * See
+ * [Reviewing Pricing Options for Plans and Plan Templates](https://www.m3ter.com/docs/guides/pricing-plans/reviewing-pricing-options-and-pricing-plans)
+ * for more information.
+ */
override fun pricings(): PricingService.WithRawResponse = pricings
+ /**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Products.
+ *
+ * A Product represents the products and services you offer to your end customers. Products
+ * act as a container for the Meters, Aggregations, Pricing, and Plans required to implement
+ * usage-based and other pricing models for your Organization.
+ */
override fun products(): ProductService.WithRawResponse = products
+ /**
+ * Endpoints for ResourceGroup related operations such as creation, update, list and delete.
+ *
+ * ResourceGroups are used in the context of Permission Policies, which controls what a User
+ * who has been given access to your Organization can and cannot do. For example, you might
+ * want to create a Permissions Policy that denies Users the ability to retrieve Meters.
+ *
+ * Resources are defined as m3ter Resource Identifiers *(MRIs)* in the format:
+ * ```
+ * service:resource-type/item-type/id
+ * ```
+ *
+ * Where:
+ * * service is a distinct part of the overall m3ter system, and which forms a natural
+ * functional grouping, such as "config" or "billing".
+ * * resource-type is the resource type item accessed - for example: "Plan", "Meter", "Bill"
+ * * item-type is one of:
+ * * "item" - to specify an individual item.
+ * * "group" - to specify a resource group.
+ * * id is the resource group id or the resource item id
+ *
+ * Resources can be assigned to one or more ResourceGroups. For example, a Plan can be
+ * assigned to Plan ResourceGroups, a Meter can be assigned to Meter ResourceGroups, and so
+ * on. This is useful for cases where you want to create Permission Policies which allow or
+ * deny access to a specific subset of resources. For example, grant a user access to only
+ * some of the Plans in your Organization.
+ *
+ * This concept of grouping resources applies to every resource in m3ter, including
+ * ResourceGroups themselves. This allows you to nest ResourceGroups to support hierarchies
+ * of groups.
+ *
+ * See
+ * [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/managing-organization-and-users/creating-and-managing-permissions)
+ * in the m3ter documentation for more information.
+ *
+ * **Note: User Resource Groups** You can create a User Resource Group to group resources of
+ * type = `user`. You can then retrieve a list of the User Resource Groups a user belongs
+ * to. For more details, see the
+ * [Retrieve OrgUser Groups](https://www.m3ter.com/docs/api#tag/OrgUsers/operation/GetOrgUserGroups)
+ * call in the OrgUsers section.
+ */
override fun resourceGroups(): ResourceGroupService.WithRawResponse = resourceGroups
+ /**
+ * Endpoints for retrieving and managing scheduled Events' configurations.
+ *
+ * Scheduled Event Configurations define custom Event types that reference Date/Time fields
+ * belonging to configuration and billing entities. They therefore provide you with an extra
+ * degree of flexibility over and above system-generated Events for setting up Notifications
+ * based on Events.
+ *
+ * For more details, see the
+ * [Working with Scheduled Events](https://www.m3ter.com/docs/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events)
+ * in our Documenation.
+ */
override fun scheduledEventConfigurations():
ScheduledEventConfigurationService.WithRawResponse = scheduledEventConfigurations
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights
+ * into the consumption patterns and charges of your end-customer Accounts.
+ */
override fun statements(): StatementService.WithRawResponse = statements
+ /**
+ * Endpoints for TransactionType operations such as creation, update, list, retrieve, and
+ * delete.
+ *
+ * You can create TransactionTypes for your Organization, which can then be used when
+ * creating and updating Balances. Example TransactionTypes: "Balance Amount" or "Add
+ * Funds".
+ *
+ * For details on creating a Transaction amount for a Balance using a TransactionType you've
+ * created for your Organization, see the
+ * [Create Balance Transaction](https://www.m3ter.com/docs/api#tag/Balances/operation/PostBalanceTransaction)
+ * call in the [Balances](https://www.m3ter.com/docs/api#tag/Balances) section of this API
+ * Reference.
+ */
override fun transactionTypes(): TransactionTypeService.WithRawResponse = transactionTypes
override fun usage(): UsageService.WithRawResponse = usage
override fun users(): UserService.WithRawResponse = users
+ /**
+ * A suite of endpoints for configuring and managing third party integrations within the
+ * m3ter platform. The integration endpoints in this section facilitate various operations
+ * such as creating, updating, listing, and deletion of integrations.
+ *
+ * m3ter integrations enable seamless data synchronization and mapping with external systems
+ * required in core business processes. These processes often include sales, pricing,
+ * billing and invoicing, and general finance.
+ *
+ * With m3ter integrations, you can establish robust connections with popular business
+ * platforms, enhancing your operational capabilities. For example:
+ * * Chargebee
+ * * Salesforce
+ * * Stripe
+ * * Netsuite
+ * * Paddle
+ * * Xero
+ * * QuickBooks
+ */
override fun webhooks(): WebhookService.WithRawResponse = webhooks
}
}
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/core/ClientOptions.kt b/sdk-java-core/src/main/kotlin/com/m3ter/core/ClientOptions.kt
index 340ad662..c0739c53 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/core/ClientOptions.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/core/ClientOptions.kt
@@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.json.JsonMapper
import com.m3ter.core.http.AsyncStreamResponse
import com.m3ter.core.http.Headers
import com.m3ter.core.http.HttpClient
+import com.m3ter.core.http.LoggingHttpClient
import com.m3ter.core.http.PhantomReachableClosingHttpClient
import com.m3ter.core.http.QueryParams
import com.m3ter.core.http.RetryingHttpClient
@@ -80,6 +81,9 @@ private constructor(
/**
* Whether to call `validate` on every response before returning it.
*
+ * Setting this to `true` is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
* Defaults to false, which means the shape of the response will not be validated upfront.
* Instead, validation will only occur for the parts of the response that are accessed.
*/
@@ -107,6 +111,14 @@ private constructor(
* Defaults to 2.
*/
@get:JvmName("maxRetries") val maxRetries: Int,
+ /**
+ * The level at which to log request and response information.
+ *
+ * [fromEnv] will set the level from environment variables. See [LogLevel.fromEnv].
+ *
+ * Defaults to [LogLevel.fromEnv].
+ */
+ @get:JvmName("logLevel") val logLevel: LogLevel,
@get:JvmName("apiKey") val apiKey: String,
@get:JvmName("apiSecret") val apiSecret: String,
private val token: String?,
@@ -172,6 +184,7 @@ private constructor(
private var responseValidation: Boolean = false
private var timeout: Timeout = Timeout.default()
private var maxRetries: Int = 2
+ private var logLevel: LogLevel = LogLevel.fromEnv()
private var apiKey: String? = null
private var apiSecret: String? = null
private var token: String? = null
@@ -191,6 +204,7 @@ private constructor(
responseValidation = clientOptions.responseValidation
timeout = clientOptions.timeout
maxRetries = clientOptions.maxRetries
+ logLevel = clientOptions.logLevel
apiKey = clientOptions.apiKey
apiSecret = clientOptions.apiSecret
token = clientOptions.token
@@ -274,6 +288,9 @@ private constructor(
/**
* Whether to call `validate` on every response before returning it.
*
+ * Setting this to `true` is _not_ forwards compatible with new types from the API for
+ * existing fields.
+ *
* Defaults to false, which means the shape of the response will not be validated upfront.
* Instead, validation will only occur for the parts of the response that are accessed.
*/
@@ -315,6 +332,15 @@ private constructor(
*/
fun maxRetries(maxRetries: Int) = apply { this.maxRetries = maxRetries }
+ /**
+ * The level at which to log request and response information.
+ *
+ * [fromEnv] will set the level from environment variables. See [LogLevel.fromEnv].
+ *
+ * Defaults to [LogLevel.fromEnv].
+ */
+ fun logLevel(logLevel: LogLevel) = apply { this.logLevel = logLevel }
+
fun apiKey(apiKey: String) = apply { this.apiKey = apiKey }
fun apiSecret(apiSecret: String) = apply { this.apiSecret = apiSecret }
@@ -424,6 +450,7 @@ private constructor(
* System properties take precedence over environment variables.
*/
fun fromEnv() = apply {
+ logLevel(LogLevel.fromEnv())
(System.getProperty("m3ter.baseUrl") ?: System.getenv("M3TER_BASE_URL"))?.let {
baseUrl(it)
}
@@ -439,6 +466,14 @@ private constructor(
(System.getProperty("m3ter.m3TerOrgId") ?: System.getenv("M3TER_ORG_ID"))?.let {
orgId(it)
}
+ System.getenv("M3TER_CUSTOM_HEADERS")?.let { customHeadersEnv ->
+ for (line in customHeadersEnv.split("\n")) {
+ val colon = line.indexOf(':')
+ if (colon >= 0) {
+ putHeader(line.substring(0, colon).trim(), line.substring(colon + 1).trim())
+ }
+ }
+ }
}
/**
@@ -491,18 +526,25 @@ private constructor(
headers.put("X-Stainless-Runtime", "JRE")
headers.put("X-Stainless-Runtime-Version", getJavaVersion())
headers.put("X-Stainless-Kotlin-Version", KotlinVersion.CURRENT.toString())
+ // We replace after all the default headers to allow end-users to overwrite them.
+ headers.replaceAll(this.headers.build())
+ queryParams.replaceAll(this.queryParams.build())
token?.let {
if (!it.isEmpty()) {
- headers.put("Authorization", "Bearer $it")
+ headers.replace("Authorization", "Bearer $it")
}
}
- headers.replaceAll(this.headers.build())
- queryParams.replaceAll(this.queryParams.build())
return ClientOptions(
httpClient,
RetryingHttpClient.builder()
- .httpClient(httpClient)
+ .httpClient(
+ LoggingHttpClient.builder()
+ .httpClient(httpClient)
+ .clock(clock)
+ .level(logLevel)
+ .build()
+ )
.sleeper(sleeper)
.clock(clock)
.maxRetries(maxRetries)
@@ -518,6 +560,7 @@ private constructor(
responseValidation,
timeout,
maxRetries,
+ logLevel,
apiKey,
apiSecret,
token,
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/core/LogLevel.kt b/sdk-java-core/src/main/kotlin/com/m3ter/core/LogLevel.kt
new file mode 100644
index 00000000..9f6813ad
--- /dev/null
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/core/LogLevel.kt
@@ -0,0 +1,33 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.m3ter.core
+
+/** The level at which to log request and response information. */
+enum class LogLevel {
+ /** No logging. */
+ OFF,
+ /** Minimal request and response summary logs. No headers or bodies are logged. */
+ INFO,
+ /** [INFO] logs plus details about request failures. */
+ ERROR,
+ /**
+ * Full request and response logs. Sensitive headers are redacted, but sensitive data in request
+ * and response bodies may still be visible.
+ */
+ DEBUG;
+
+ /** Returns whether this level is at or higher than the given [level]. */
+ fun shouldLog(level: LogLevel): Boolean = ordinal >= level.ordinal
+
+ companion object {
+
+ /** Returns a [LogLevel] based on the `M3TER_LOG` environment variable. */
+ fun fromEnv() =
+ when (System.getenv("M3TER_LOG")?.lowercase()) {
+ "info" -> INFO
+ "error" -> ERROR
+ "debug" -> DEBUG
+ else -> OFF
+ }
+ }
+}
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/core/ObjectMappers.kt b/sdk-java-core/src/main/kotlin/com/m3ter/core/ObjectMappers.kt
index 17816afc..bdc5ccbe 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/core/ObjectMappers.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/core/ObjectMappers.kt
@@ -29,7 +29,9 @@ import java.time.ZoneId
import java.time.format.DateTimeFormatter
import java.time.temporal.ChronoField
-fun jsonMapper(): JsonMapper =
+fun jsonMapper(): JsonMapper = JSON_MAPPER
+
+private val JSON_MAPPER: JsonMapper =
JsonMapper.builder()
.addModule(kotlinModule())
.addModule(Jdk8Module())
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/core/Properties.kt b/sdk-java-core/src/main/kotlin/com/m3ter/core/Properties.kt
index dcbbb2d6..670f7acd 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/core/Properties.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/core/Properties.kt
@@ -34,9 +34,9 @@ fun getOsName(): String {
}
}
-fun getOsVersion(): String = System.getProperty("os.version", "unknown")
+fun getOsVersion(): String = System.getProperty("os.version", "unknown") ?: "unknown"
fun getPackageVersion(): String =
- M3terClient::class.java.`package`.implementationVersion ?: "unknown"
+ M3terClient::class.java.`package`?.implementationVersion ?: "unknown"
-fun getJavaVersion(): String = System.getProperty("java.version", "unknown")
+fun getJavaVersion(): String = System.getProperty("java.version", "unknown") ?: "unknown"
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/core/RequestOptions.kt b/sdk-java-core/src/main/kotlin/com/m3ter/core/RequestOptions.kt
index 8e312d67..2dc1365f 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/core/RequestOptions.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/core/RequestOptions.kt
@@ -33,6 +33,15 @@ class RequestOptions private constructor(val responseValidation: Boolean?, val t
private var responseValidation: Boolean? = null
private var timeout: Timeout? = null
+ /**
+ * Whether to call `validate` on the response before returning it.
+ *
+ * Setting this to `true` is _not_ forwards compatible with new types from the API for
+ * existing fields.
+ *
+ * Defaults to false, which means the shape of the response will not be validated upfront.
+ * Instead, validation will only occur for the parts of the response that are accessed.
+ */
fun responseValidation(responseValidation: Boolean) = apply {
this.responseValidation = responseValidation
}
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/core/Utils.kt b/sdk-java-core/src/main/kotlin/com/m3ter/core/Utils.kt
index b9750e64..05a9daa0 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/core/Utils.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/core/Utils.kt
@@ -5,6 +5,7 @@ package com.m3ter.core
import com.m3ter.errors.M3terInvalidDataException
import java.util.Collections
import java.util.SortedMap
+import java.util.SortedSet
import java.util.concurrent.CompletableFuture
import java.util.concurrent.locks.Lock
@@ -16,6 +17,11 @@ internal fun T?.getOrThrow(name: String): T =
internal fun List.toImmutable(): List =
if (isEmpty()) Collections.emptyList() else Collections.unmodifiableList(toList())
+@JvmSynthetic
+internal fun > SortedSet.toImmutable(): SortedSet =
+ if (isEmpty()) Collections.emptySortedSet()
+ else Collections.unmodifiableSortedSet(toSortedSet(comparator() ?: Comparator.naturalOrder()))
+
@JvmSynthetic
internal fun Map.toImmutable(): Map =
if (isEmpty()) immutableEmptyMap() else Collections.unmodifiableMap(toMap())
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/core/http/HttpRequestBodies.kt b/sdk-java-core/src/main/kotlin/com/m3ter/core/http/HttpRequestBodies.kt
index 4cd5bfc1..5b90da9c 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/core/http/HttpRequestBodies.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/core/http/HttpRequestBodies.kt
@@ -8,13 +8,13 @@ import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.json.JsonMapper
import com.fasterxml.jackson.databind.node.JsonNodeType
import com.m3ter.core.MultipartField
+import com.m3ter.core.toImmutable
import com.m3ter.errors.M3terInvalidDataException
+import java.io.ByteArrayInputStream
import java.io.InputStream
import java.io.OutputStream
+import java.util.UUID
import kotlin.jvm.optionals.getOrNull
-import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder
-import org.apache.hc.core5.http.ContentType
-import org.apache.hc.core5.http.HttpEntity
@JvmSynthetic
internal inline fun json(jsonMapper: JsonMapper, value: T): HttpRequestBody =
@@ -37,92 +37,231 @@ internal fun multipartFormData(
jsonMapper: JsonMapper,
fields: Map>,
): HttpRequestBody =
- object : HttpRequestBody {
- private val entity: HttpEntity by lazy {
- MultipartEntityBuilder.create()
- .apply {
- fields.forEach { (name, field) ->
- val knownValue = field.value.asKnown().getOrNull()
- val parts =
- if (knownValue is InputStream) {
- // Read directly from the `InputStream` instead of reading it all
- // into memory due to the `jsonMapper` serialization below.
- sequenceOf(name to knownValue)
- } else {
- val node = jsonMapper.valueToTree(field.value)
- serializePart(name, node)
+ MultipartBody.Builder()
+ .apply {
+ fields.forEach { (name, field) ->
+ val knownValue = field.value.asKnown().getOrNull()
+ val parts =
+ if (knownValue is InputStream) {
+ // Read directly from the `InputStream` instead of reading it all
+ // into memory due to the `jsonMapper` serialization below.
+ sequenceOf(name to knownValue)
+ } else {
+ val node = jsonMapper.valueToTree(field.value)
+ serializePart(name, node)
+ }
+
+ parts.forEach { (name, bytes) ->
+ val partBody =
+ if (bytes is ByteArrayInputStream) {
+ val byteArray = bytes.readBytes()
+
+ object : HttpRequestBody {
+
+ override fun writeTo(outputStream: OutputStream) {
+ outputStream.write(byteArray)
+ }
+
+ override fun contentType(): String = field.contentType
+
+ override fun contentLength(): Long = byteArray.size.toLong()
+
+ override fun repeatable(): Boolean = true
+
+ override fun close() {}
}
+ } else {
+ object : HttpRequestBody {
+
+ override fun writeTo(outputStream: OutputStream) {
+ bytes.copyTo(outputStream)
+ }
+
+ override fun contentType(): String = field.contentType
+
+ override fun contentLength(): Long = -1L
- parts.forEach { (name, bytes) ->
- addBinaryBody(
- name,
- bytes,
- ContentType.parseLenient(field.contentType),
- field.filename().getOrNull(),
- )
+ override fun repeatable(): Boolean = false
+
+ override fun close() = bytes.close()
+ }
}
- }
+
+ addPart(
+ MultipartBody.Part.create(
+ name,
+ field.filename().getOrNull(),
+ field.contentType,
+ partBody,
+ )
+ )
}
- .build()
+ }
}
+ .build()
- private fun serializePart(
- name: String,
- node: JsonNode,
- ): Sequence> =
- when (node.nodeType) {
- JsonNodeType.MISSING,
- JsonNodeType.NULL -> emptySequence()
- JsonNodeType.BINARY -> sequenceOf(name to node.binaryValue().inputStream())
- JsonNodeType.STRING -> sequenceOf(name to node.textValue().inputStream())
- JsonNodeType.BOOLEAN ->
- sequenceOf(name to node.booleanValue().toString().inputStream())
- JsonNodeType.NUMBER ->
- sequenceOf(name to node.numberValue().toString().inputStream())
- JsonNodeType.ARRAY ->
- sequenceOf(
- name to
- node
- .elements()
- .asSequence()
- .mapNotNull { element ->
- when (element.nodeType) {
- JsonNodeType.MISSING,
- JsonNodeType.NULL -> null
- JsonNodeType.STRING -> node.textValue()
- JsonNodeType.BOOLEAN -> node.booleanValue().toString()
- JsonNodeType.NUMBER -> node.numberValue().toString()
- null,
- JsonNodeType.BINARY,
- JsonNodeType.ARRAY,
- JsonNodeType.OBJECT,
- JsonNodeType.POJO ->
- throw M3terInvalidDataException(
- "Unexpected JsonNode type in array: ${node.nodeType}"
- )
- }
- }
- .joinToString(",")
- .inputStream()
- )
- JsonNodeType.OBJECT ->
- node.fields().asSequence().flatMap { (key, value) ->
- serializePart("$name[$key]", value)
- }
- JsonNodeType.POJO,
- null ->
- throw M3terInvalidDataException("Unexpected JsonNode type: ${node.nodeType}")
+private fun serializePart(name: String, node: JsonNode): Sequence> =
+ when (node.nodeType) {
+ JsonNodeType.MISSING,
+ JsonNodeType.NULL -> emptySequence()
+ JsonNodeType.BINARY -> sequenceOf(name to node.binaryValue().inputStream())
+ JsonNodeType.STRING -> sequenceOf(name to node.textValue().byteInputStream())
+ JsonNodeType.BOOLEAN -> sequenceOf(name to node.booleanValue().toString().byteInputStream())
+ JsonNodeType.NUMBER -> sequenceOf(name to node.numberValue().toString().byteInputStream())
+ JsonNodeType.ARRAY ->
+ sequenceOf(
+ name to
+ node
+ .elements()
+ .asSequence()
+ .mapNotNull { element ->
+ when (element.nodeType) {
+ JsonNodeType.MISSING,
+ JsonNodeType.NULL -> null
+ JsonNodeType.STRING -> element.textValue()
+ JsonNodeType.BOOLEAN -> element.booleanValue().toString()
+ JsonNodeType.NUMBER -> element.numberValue().toString()
+ null,
+ JsonNodeType.BINARY,
+ JsonNodeType.ARRAY,
+ JsonNodeType.OBJECT,
+ JsonNodeType.POJO ->
+ throw M3terInvalidDataException(
+ "Unexpected JsonNode type in array: ${element.nodeType}"
+ )
+ }
+ }
+ .joinToString(",")
+ .byteInputStream()
+ )
+ JsonNodeType.OBJECT ->
+ node.fields().asSequence().flatMap { (key, value) ->
+ serializePart("$name[$key]", value)
+ }
+ JsonNodeType.POJO,
+ null -> throw M3terInvalidDataException("Unexpected JsonNode type: ${node.nodeType}")
+ }
+
+private class MultipartBody
+private constructor(private val boundary: String, private val parts: List) : HttpRequestBody {
+ private val boundaryBytes: ByteArray = boundary.toByteArray()
+ private val contentType = "multipart/form-data; boundary=$boundary"
+
+ // This must remain in sync with `contentLength`.
+ override fun writeTo(outputStream: OutputStream) {
+ parts.forEach { part ->
+ outputStream.write(DASHDASH)
+ outputStream.write(boundaryBytes)
+ outputStream.write(CRLF)
+
+ outputStream.write(CONTENT_DISPOSITION)
+ outputStream.write(part.contentDisposition.toByteArray())
+ outputStream.write(CRLF)
+
+ outputStream.write(CONTENT_TYPE)
+ outputStream.write(part.contentType.toByteArray())
+ outputStream.write(CRLF)
+
+ outputStream.write(CRLF)
+ part.body.writeTo(outputStream)
+ outputStream.write(CRLF)
+ }
+
+ outputStream.write(DASHDASH)
+ outputStream.write(boundaryBytes)
+ outputStream.write(DASHDASH)
+ outputStream.write(CRLF)
+ }
+
+ override fun contentType(): String = contentType
+
+ // This must remain in sync with `writeTo`.
+ override fun contentLength(): Long {
+ var byteCount = 0L
+
+ parts.forEach { part ->
+ val contentLength = part.body.contentLength()
+ if (contentLength == -1L) {
+ return -1L
}
- private fun String.inputStream(): InputStream = toByteArray().inputStream()
+ byteCount +=
+ DASHDASH.size +
+ boundaryBytes.size +
+ CRLF.size +
+ CONTENT_DISPOSITION.size +
+ part.contentDisposition.toByteArray().size +
+ CRLF.size +
+ CONTENT_TYPE.size +
+ part.contentType.toByteArray().size +
+ CRLF.size +
+ CRLF.size +
+ contentLength +
+ CRLF.size
+ }
- override fun writeTo(outputStream: OutputStream) = entity.writeTo(outputStream)
+ byteCount += DASHDASH.size + boundaryBytes.size + DASHDASH.size + CRLF.size
+ return byteCount
+ }
- override fun contentType(): String = entity.contentType
+ override fun repeatable(): Boolean = parts.all { it.body.repeatable() }
- override fun contentLength(): Long = entity.contentLength
+ override fun close() {
+ parts.forEach { it.body.close() }
+ }
- override fun repeatable(): Boolean = entity.isRepeatable
+ class Builder {
+ private val boundary = UUID.randomUUID().toString()
+ private val parts: MutableList = mutableListOf()
- override fun close() = entity.close()
+ fun addPart(part: Part) = apply { parts.add(part) }
+
+ fun build() = MultipartBody(boundary, parts.toImmutable())
+ }
+
+ class Part
+ private constructor(
+ val contentDisposition: String,
+ val contentType: String,
+ val body: HttpRequestBody,
+ ) {
+ companion object {
+ fun create(
+ name: String,
+ filename: String?,
+ contentType: String,
+ body: HttpRequestBody,
+ ): Part {
+ val disposition = buildString {
+ append("form-data; name=")
+ appendQuotedString(name)
+ if (filename != null) {
+ append("; filename=")
+ appendQuotedString(filename)
+ }
+ }
+ return Part(disposition, contentType, body)
+ }
+ }
+ }
+
+ companion object {
+ private val CRLF = byteArrayOf('\r'.code.toByte(), '\n'.code.toByte())
+ private val DASHDASH = byteArrayOf('-'.code.toByte(), '-'.code.toByte())
+ private val CONTENT_DISPOSITION = "Content-Disposition: ".toByteArray()
+ private val CONTENT_TYPE = "Content-Type: ".toByteArray()
+
+ private fun StringBuilder.appendQuotedString(key: String) {
+ append('"')
+ for (ch in key) {
+ when (ch) {
+ '\n' -> append("%0A")
+ '\r' -> append("%0D")
+ '"' -> append("%22")
+ else -> append(ch)
+ }
+ }
+ append('"')
+ }
}
+}
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/core/http/LoggingHttpClient.kt b/sdk-java-core/src/main/kotlin/com/m3ter/core/http/LoggingHttpClient.kt
new file mode 100644
index 00000000..30d1aa03
--- /dev/null
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/core/http/LoggingHttpClient.kt
@@ -0,0 +1,628 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.m3ter.core.http
+
+import com.m3ter.core.LogLevel
+import com.m3ter.core.RequestOptions
+import com.m3ter.core.checkRequired
+import com.m3ter.core.toImmutable
+import java.io.ByteArrayOutputStream
+import java.io.InputStream
+import java.io.OutputStream
+import java.nio.ByteBuffer
+import java.nio.charset.CharacterCodingException
+import java.nio.charset.Charset
+import java.nio.charset.CharsetDecoder
+import java.nio.charset.CodingErrorAction
+import java.nio.charset.StandardCharsets
+import java.time.Clock
+import java.time.Duration
+import java.time.OffsetDateTime
+import java.util.SortedSet
+import java.util.concurrent.CompletableFuture
+import java.util.concurrent.CompletionException
+import kotlin.time.toKotlinDuration
+
+/** A wrapper [HttpClient] around [httpClient] that logs request and response information. */
+class LoggingHttpClient
+private constructor(
+ /** The underlying [HttpClient] for making requests. */
+ @get:JvmName("httpClient") val httpClient: HttpClient,
+ /**
+ * Sensitive headers to redact from logs.
+ *
+ * Defaults to `Set.of("authorization", "api-key", "x-api-key", "cookie", "set-cookie")`.
+ */
+ @get:JvmName("redactedHeaders") val redactedHeaders: SortedSet,
+ /**
+ * The clock to use for measuring request and response durations.
+ *
+ * This is primarily useful for using a fake clock in tests.
+ *
+ * Defaults to [Clock.systemUTC].
+ */
+ @get:JvmName("clock") val clock: Clock,
+ /**
+ * The log level to use.
+ *
+ * Pass [LogLevel.fromEnv] to read from environment variables.
+ */
+ @get:JvmName("level") val level: LogLevel,
+) : HttpClient {
+
+ override fun execute(request: HttpRequest, requestOptions: RequestOptions): HttpResponse {
+ val loggingRequest = logRequest(request)
+
+ val before = OffsetDateTime.now(clock)
+ val response =
+ try {
+ httpClient.execute(loggingRequest, requestOptions)
+ } catch (e: Throwable) {
+ logFailure(e, Duration.between(before, OffsetDateTime.now(clock)))
+ throw e
+ }
+
+ val took = Duration.between(before, OffsetDateTime.now(clock))
+ return logResponse(response, took)
+ }
+
+ override fun executeAsync(
+ request: HttpRequest,
+ requestOptions: RequestOptions,
+ ): CompletableFuture {
+ val loggingRequest = logRequest(request)
+
+ val before = OffsetDateTime.now(clock)
+ val future =
+ try {
+ httpClient.executeAsync(loggingRequest, requestOptions)
+ } catch (e: Throwable) {
+ logFailure(e, Duration.between(before, OffsetDateTime.now(clock)))
+ throw e
+ }
+ return future.handle { response, error ->
+ val took = Duration.between(before, OffsetDateTime.now(clock))
+ if (error != null) {
+ logFailure(unwrapCompletionException(error), took)
+ throw error
+ }
+ logResponse(response, took)
+ }
+ }
+
+ private fun logRequest(request: HttpRequest): HttpRequest {
+ if (!level.shouldLog(LogLevel.INFO)) {
+ return request
+ }
+
+ System.err.println(
+ buildString {
+ append("--> ${request.method} ${request.url()}")
+ request.body?.let {
+ val length = it.contentLength()
+ append(if (length >= 0) " ($length-byte body)" else " (unknown-length body)")
+ }
+ }
+ )
+
+ if (!level.shouldLog(LogLevel.DEBUG)) {
+ return request
+ }
+
+ logHeaders(request.headers)
+
+ if (request.body == null) {
+ System.err.println("--> END ${request.method}")
+ System.err.println()
+ return request
+ }
+
+ return request
+ .toBuilder()
+ .body(LoggingHttpRequestBody(request.method, request.body))
+ .build()
+ }
+
+ private fun logResponse(response: HttpResponse, took: Duration): HttpResponse {
+ if (!level.shouldLog(LogLevel.INFO)) {
+ return response
+ }
+
+ val contentLength = response.headers().values("Content-Length").firstOrNull()?.toIntOrNull()
+ System.err.println(
+ "<-- ${response.statusCode()} (${
+ buildString {
+ append(took.format())
+ contentLength?.let { append(", $contentLength-byte body") }
+ }
+ })"
+ )
+
+ if (!level.shouldLog(LogLevel.DEBUG)) {
+ return response
+ }
+
+ logHeaders(response.headers())
+ return LoggingHttpResponse(response)
+ }
+
+ private fun logFailure(error: Throwable, took: Duration) {
+ if (!level.shouldLog(LogLevel.ERROR)) {
+ return
+ }
+
+ System.err.println(
+ buildString {
+ append("<-- !! ${error.javaClass.simpleName}")
+ error.message?.let { append(": $it") }
+ append(" (${took.format()})")
+ }
+ )
+ }
+
+ private fun unwrapCompletionException(error: Throwable): Throwable =
+ if (error is CompletionException && error.cause != null) error.cause!! else error
+
+ private fun logHeaders(headers: Headers) =
+ headers.names().forEach { name ->
+ headers.values(name).forEach { value ->
+ System.err.println("$name: ${if (redactedHeaders.contains(name)) "██" else value}")
+ }
+ }
+
+ override fun close() = httpClient.close()
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [LoggingHttpClient].
+ *
+ * The following fields are required:
+ * ```java
+ * .httpClient()
+ * .level()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [LoggingHttpClient]. */
+ class Builder internal constructor() {
+
+ private var httpClient: HttpClient? = null
+ private var redactedHeaders: Set =
+ setOf("authorization", "api-key", "x-api-key", "cookie", "set-cookie")
+ private var clock: Clock = Clock.systemUTC()
+ private var level: LogLevel? = null
+
+ @JvmSynthetic
+ internal fun from(loggingHttpClient: LoggingHttpClient) = apply {
+ httpClient = loggingHttpClient.httpClient
+ redactedHeaders = loggingHttpClient.redactedHeaders
+ clock = loggingHttpClient.clock
+ level = loggingHttpClient.level
+ }
+
+ /** The underlying [HttpClient] for making requests. */
+ fun httpClient(httpClient: HttpClient) = apply { this.httpClient = httpClient }
+
+ /**
+ * Sensitive headers to redact from logs.
+ *
+ * Defaults to `Set.of("authorization", "api-key", "x-api-key", "cookie", "set-cookie")`.
+ */
+ fun redactedHeaders(redactedHeaders: Set) = apply {
+ this.redactedHeaders = redactedHeaders
+ }
+
+ /**
+ * The clock to use for measuring request and response durations.
+ *
+ * This is primarily useful for using a fake clock in tests.
+ *
+ * Defaults to [Clock.systemUTC].
+ */
+ fun clock(clock: Clock) = apply { this.clock = clock }
+
+ /**
+ * The log level to use.
+ *
+ * Pass [LogLevel.fromEnv] to read from environment variables.
+ */
+ fun level(level: LogLevel) = apply { this.level = level }
+
+ /**
+ * Returns an immutable instance of [LoggingHttpClient].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .httpClient()
+ * .level()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): LoggingHttpClient =
+ LoggingHttpClient(
+ checkRequired("httpClient", httpClient),
+ redactedHeaders.toSortedSet(String.CASE_INSENSITIVE_ORDER).toImmutable(),
+ clock,
+ checkRequired("level", level),
+ )
+ }
+}
+
+/**
+ * An [HttpRequestBody] wrapper that delegates to [body] while also logging line by line as it's
+ * written.
+ *
+ * The logging occurs in a streaming manner with minimal buffering.
+ */
+private class LoggingHttpRequestBody(
+ private val method: HttpMethod,
+ private val body: HttpRequestBody,
+) : HttpRequestBody {
+
+ private val charset by lazy { parseCharset(body.contentType()) }
+
+ override fun writeTo(outputStream: OutputStream) {
+ val loggingOutputStream = LoggingOutputStream(outputStream, charset)
+ body.writeTo(loggingOutputStream)
+
+ loggingOutputStream.flush()
+ System.err.println("--> END $method (${loggingOutputStream.writeCount()}-byte body)")
+ System.err.println()
+ }
+
+ override fun contentType(): String? = body.contentType()
+
+ override fun contentLength(): Long = body.contentLength()
+
+ override fun repeatable(): Boolean = body.repeatable()
+
+ override fun close() = body.close()
+}
+
+/**
+ * An [OutputStream] wrapper that delegates to [outputStream] while also logging bytes line by line
+ * as it's written to.
+ *
+ * The written content is assumed to be in the given [charset] and the logging occurs in a streaming
+ * manner with minimal buffering.
+ */
+private class LoggingOutputStream(private val outputStream: OutputStream, charset: Charset?) :
+ OutputStream() {
+
+ private val buffer = LoggingBuffer(charset)
+
+ fun writeCount() = buffer.writeCount()
+
+ override fun write(b: Int) {
+ outputStream.write(b)
+ buffer.write(b)
+ }
+
+ override fun write(b: ByteArray, off: Int, len: Int) {
+ outputStream.write(b, off, len)
+ for (i in off until off + len) {
+ buffer.write(b[i].toInt() and 0xFF)
+ }
+ }
+
+ /** Prints any currently buffered content. */
+ override fun flush() {
+ buffer.flush()
+ outputStream.flush()
+ }
+
+ override fun close() = outputStream.close()
+}
+
+/**
+ * An [HttpResponse] wrapper that delegates to [response] while also logging line-by-line as it's
+ * read.
+ *
+ * The logging occurs in a streaming manner with minimal buffering.
+ */
+private class LoggingHttpResponse(private val response: HttpResponse) : HttpResponse {
+
+ private val loggingBody: Lazy = lazy {
+ LoggingInputStream(
+ response.body(),
+ parseCharset(response.headers().values("Content-Type").firstOrNull()),
+ )
+ }
+
+ override fun statusCode(): Int = response.statusCode()
+
+ override fun headers(): Headers = response.headers()
+
+ override fun body(): InputStream = loggingBody.value
+
+ override fun close() {
+ if (loggingBody.isInitialized()) {
+ loggingBody.value.close()
+ }
+ response.close()
+ }
+}
+
+/**
+ * An [InputStream] wrapper that delegates to [inputStream] while also logging bytes line by line as
+ * it's read.
+ *
+ * The contents of [inputStream] are assumed to be in the given [charset] and the logging occurs in
+ * a streaming manner with minimal buffering.
+ */
+private class LoggingInputStream(private val inputStream: InputStream, charset: Charset?) :
+ InputStream() {
+
+ private var isDone = false
+ private val buffer = LoggingBuffer(charset)
+
+ override fun read(): Int {
+ if (isDone) {
+ return -1
+ }
+
+ val b = inputStream.read()
+
+ if (b == -1) {
+ markDone()
+ return b
+ }
+
+ buffer.write(b)
+ return b
+ }
+
+ override fun read(b: ByteArray, off: Int, len: Int): Int {
+ if (isDone) {
+ return -1
+ }
+
+ val bytesRead = inputStream.read(b, off, len)
+
+ if (bytesRead == -1) {
+ markDone()
+ return bytesRead
+ }
+
+ for (i in off until off + bytesRead) {
+ buffer.write(b[i].toInt() and 0xFF)
+ }
+ return bytesRead
+ }
+
+ override fun close() {
+ if (!isDone) {
+ markDone(closedEarly = true)
+ }
+ inputStream.close()
+ }
+
+ private fun markDone(closedEarly: Boolean = false) {
+ isDone = true
+ buffer.flush()
+ val suffix = if (closedEarly) ", closed early" else ""
+ System.err.println("<-- END HTTP (${buffer.writeCount()}-byte body$suffix)")
+ System.err.println()
+ }
+}
+
+/**
+ * A byte buffer that prints line by line, using the given [charset], as bytes are written to it.
+ *
+ * When [charset] is `null`, the buffer performs an upfront check to detect binary content. If
+ * non-whitespace ISO control characters are found in the first [PROBABLY_UTF8_CODE_POINT_LIMIT]
+ * code points, body logging is suppressed entirely.
+ */
+private class LoggingBuffer(charset: Charset?) {
+
+ private val charset = charset ?: StandardCharsets.UTF_8
+
+ private val decoder: CharsetDecoder =
+ this.charset
+ .newDecoder()
+ .onMalformedInput(CodingErrorAction.REPORT)
+ .onUnmappableCharacter(CodingErrorAction.REPORT)
+ private var writeCount = 0
+ private val buffer = ByteArrayOutputStream(128)
+
+ /**
+ * Whether logging has been suppressed because the content doesn't appear to be readable text.
+ *
+ * This is only set when [charset] is `null` and the content fails the [isProbablyUtf8] check.
+ */
+ private var suppressed = false
+
+ /**
+ * Bytes accumulated for the [isProbablyUtf8] check before any lines are printed.
+ *
+ * Once the check passes (or [charset] is non-null), this is set to `null` and bytes flow
+ * directly to [buffer].
+ */
+ private var prefetchBuffer: ByteArrayOutputStream? =
+ if (charset != null) null else ByteArrayOutputStream(128)
+
+ fun writeCount() = writeCount
+
+ fun write(b: Int) {
+ if (writeCount == 0) {
+ // Print a newline before we start printing anything to separate the printed content
+ // from previous content.
+ System.err.println()
+ }
+
+ writeCount++
+
+ if (suppressed) {
+ return
+ }
+
+ val prefetch = prefetchBuffer
+ if (prefetch != null) {
+ prefetch.write(b)
+ // Continue accumulating until we have enough bytes to decide.
+ if (prefetch.size() < PROBABLY_UTF8_BYTE_LIMIT && b != '\n'.code) {
+ return
+ }
+ // We have enough bytes. Check if the content is probably UTF-8.
+ prefetchBuffer = null
+ val bytes = prefetch.toByteArray()
+ if (!isProbablyUtf8(bytes)) {
+ suppressed = true
+ System.err.println("(binary body omitted)")
+ return
+ }
+ // Content looks like UTF-8. Feed the accumulated bytes into the normal buffer.
+ for (byte in bytes) {
+ writeToBuffer(byte.toInt() and 0xFF)
+ }
+ return
+ }
+
+ writeToBuffer(b)
+ }
+
+ private fun writeToBuffer(b: Int) {
+ if (b == '\n'.code) {
+ flush()
+ return
+ }
+
+ buffer.write(b)
+ }
+
+ /** Prints any currently buffered content. */
+ fun flush() {
+ if (suppressed) {
+ return
+ }
+
+ // If we still have a prefetch buffer when flush is called (body was shorter than the
+ // limit), run the check now.
+ val prefetch = prefetchBuffer
+ if (prefetch != null) {
+ prefetchBuffer = null
+ val bytes = prefetch.toByteArray()
+ if (bytes.isEmpty()) {
+ return
+ }
+ if (!isProbablyUtf8(bytes)) {
+ suppressed = true
+ System.err.println("(binary body omitted)")
+ return
+ }
+ for (byte in bytes) {
+ writeToBuffer(byte.toInt() and 0xFF)
+ }
+ }
+
+ if (buffer.size() == 0) {
+ return
+ }
+
+ val line =
+ try {
+ decoder.decode(ByteBuffer.wrap(buffer.toByteArray()))
+ } catch (e: CharacterCodingException) {
+ "(omitted line is not valid $charset)"
+ }
+ buffer.reset()
+ System.err.println(line)
+ }
+}
+
+/** The maximum number of code points to sample when checking if content is probably UTF-8. */
+private const val PROBABLY_UTF8_CODE_POINT_LIMIT = 64
+
+/**
+ * The maximum number of bytes to accumulate before running the [isProbablyUtf8] check. UTF-8 code
+ * points are at most 4 bytes, so this accommodates [PROBABLY_UTF8_CODE_POINT_LIMIT] code points.
+ */
+private const val PROBABLY_UTF8_BYTE_LIMIT = PROBABLY_UTF8_CODE_POINT_LIMIT * 4
+
+/**
+ * Returns `true` if the given [bytes] probably contain human-readable UTF-8 text.
+ *
+ * Decodes up to [PROBABLY_UTF8_CODE_POINT_LIMIT] code points and returns `false` if any
+ * non-whitespace ISO control characters are found, or if the bytes are not valid UTF-8.
+ */
+private fun isProbablyUtf8(bytes: ByteArray): Boolean {
+ try {
+ val decoder =
+ StandardCharsets.UTF_8.newDecoder()
+ .onMalformedInput(CodingErrorAction.REPORT)
+ .onUnmappableCharacter(CodingErrorAction.REPORT)
+ val charBuffer = decoder.decode(ByteBuffer.wrap(bytes))
+ var codePointCount = 0
+ var i = 0
+ while (i < charBuffer.length && codePointCount < PROBABLY_UTF8_CODE_POINT_LIMIT) {
+ val codePoint = Character.codePointAt(charBuffer, i)
+ if (Character.isISOControl(codePoint) && !Character.isWhitespace(codePoint)) {
+ return false
+ }
+ i += Character.charCount(codePoint)
+ codePointCount++
+ }
+ return true
+ } catch (e: CharacterCodingException) {
+ return false
+ }
+}
+
+/** Returns the [Charset] in the given [contentType] string, or `null` if unspecified. */
+private fun parseCharset(contentType: String?): Charset? =
+ contentType
+ ?.split(";")
+ ?.drop(1)
+ ?.map { it.trim() }
+ ?.firstOrNull { it.startsWith("charset=", ignoreCase = true) }
+ ?.substringAfter("=")
+ ?.trim()
+ ?.removeSurrounding("\"")
+ ?.let { runCatching { charset(it) }.getOrNull() }
+
+/** Formats the [Duration] into a string like "1m 40s 467ms". */
+private fun Duration.format(): String =
+ toKotlinDuration().toComponents { days, hours, minutes, seconds, nanoseconds ->
+ buildString {
+ val milliseconds = nanoseconds / 1_000_000
+ if (days > 0) {
+ append("${days}d")
+ }
+ if (hours > 0) {
+ if (isNotEmpty()) {
+ append(" ")
+ }
+ append("${hours}h")
+ }
+ if (minutes > 0) {
+ if (isNotEmpty()) {
+ append(" ")
+ }
+ append("${minutes}m")
+ }
+ if (seconds > 0) {
+ if (isNotEmpty()) {
+ append(" ")
+ }
+ append("${seconds}s")
+ }
+ if (milliseconds > 0) {
+ if (isNotEmpty()) {
+ append(" ")
+ }
+ append("${milliseconds}ms")
+ }
+
+ if (isEmpty()) {
+ append("0s")
+ }
+ }
+ }
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/core/http/ProxyAuthenticator.kt b/sdk-java-core/src/main/kotlin/com/m3ter/core/http/ProxyAuthenticator.kt
new file mode 100644
index 00000000..7efd7596
--- /dev/null
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/core/http/ProxyAuthenticator.kt
@@ -0,0 +1,59 @@
+package com.m3ter.core.http
+
+import java.net.Proxy
+import java.nio.charset.Charset
+import java.nio.charset.StandardCharsets
+import java.util.Base64
+import java.util.Optional
+
+/**
+ * Provides credentials when an HTTP proxy responds with `407 Proxy Authentication Required`.
+ *
+ * Implementations inspect the 407 [response] (typically its `Proxy-Authenticate` header) and return
+ * the request to retry with a `Proxy-Authorization` header set, or [Optional.empty] to abandon
+ * authentication and surface the 407 to the caller.
+ *
+ * Implementations must be thread-safe; they may be invoked concurrently from multiple HTTP calls.
+ */
+fun interface ProxyAuthenticator {
+
+ /**
+ * @param proxy the proxy that produced the challenge, or [Proxy.NO_PROXY] if the route is not
+ * yet established
+ * @param request the request that produced [response]
+ * @param response the 407 challenge response
+ * @return the retry request to send (typically [request] with a `Proxy-Authorization` header
+ * added), or [Optional.empty] to abandon authentication
+ */
+ fun authenticate(
+ proxy: Proxy,
+ request: HttpRequest,
+ response: HttpResponse,
+ ): Optional
+
+ companion object {
+
+ /**
+ * A [ProxyAuthenticator] that uses RFC 7617 Basic authentication with the ISO-8859-1
+ * charset.
+ */
+ @JvmStatic
+ fun basic(username: String, password: String): ProxyAuthenticator =
+ basic(username, password, StandardCharsets.ISO_8859_1)
+
+ /**
+ * A [ProxyAuthenticator] that uses RFC 7617 Basic authentication with the given [charset].
+ */
+ @JvmStatic
+ fun basic(username: String, password: String, charset: Charset): ProxyAuthenticator {
+ val token =
+ Base64.getEncoder().encodeToString("$username:$password".toByteArray(charset))
+ val headerValue = "Basic $token"
+ return ProxyAuthenticator { _, request, _ ->
+ Optional.of(
+ request.toBuilder().putHeader("Proxy-Authorization", headerValue).build()
+ )
+ }
+ }
+ }
+}
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/core/http/RetryingHttpClient.kt b/sdk-java-core/src/main/kotlin/com/m3ter/core/http/RetryingHttpClient.kt
index 3329ce76..3a8e7e49 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/core/http/RetryingHttpClient.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/core/http/RetryingHttpClient.kt
@@ -1,3 +1,5 @@
+// File generated from our OpenAPI spec by Stainless.
+
package com.m3ter.core.http
import com.m3ter.core.DefaultSleeper
@@ -199,7 +201,7 @@ private constructor(
?: headers.values("Retry-After").getOrNull(0)?.let { retryAfter ->
retryAfter.toFloatOrNull()?.times(TimeUnit.SECONDS.toNanos(1))
?: try {
- ChronoUnit.MILLIS.between(
+ ChronoUnit.NANOS.between(
OffsetDateTime.now(clock),
OffsetDateTime.parse(
retryAfter,
@@ -212,13 +214,8 @@ private constructor(
}
}
?.let { retryAfterNanos ->
- // If the API asks us to wait a certain amount of time (and it's a reasonable
- // amount), just
- // do what it says.
- val retryAfter = Duration.ofNanos(retryAfterNanos.toLong())
- if (retryAfter in Duration.ofNanos(0)..Duration.ofMinutes(1)) {
- return retryAfter
- }
+ // If the API asks us to wait a certain amount of time, do what it says.
+ return Duration.ofNanos(retryAfterNanos.toLong())
}
// Apply exponential backoff, but not more than the max.
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/errors/BadRequestException.kt b/sdk-java-core/src/main/kotlin/com/m3ter/errors/BadRequestException.kt
index 000faf17..693e21f3 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/errors/BadRequestException.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/errors/BadRequestException.kt
@@ -5,12 +5,16 @@ package com.m3ter.errors
import com.m3ter.core.JsonValue
import com.m3ter.core.checkRequired
import com.m3ter.core.http.Headers
+import com.m3ter.core.jsonMapper
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
class BadRequestException
private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) :
- M3terServiceException("400: $body", cause) {
+ M3terServiceException(
+ "400: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}",
+ cause,
+ ) {
override fun statusCode(): Int = 400
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/errors/InternalServerException.kt b/sdk-java-core/src/main/kotlin/com/m3ter/errors/InternalServerException.kt
index 1c392cba..db5f5669 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/errors/InternalServerException.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/errors/InternalServerException.kt
@@ -5,6 +5,7 @@ package com.m3ter.errors
import com.m3ter.core.JsonValue
import com.m3ter.core.checkRequired
import com.m3ter.core.http.Headers
+import com.m3ter.core.jsonMapper
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
@@ -14,7 +15,11 @@ private constructor(
private val headers: Headers,
private val body: JsonValue,
cause: Throwable?,
-) : M3terServiceException("$statusCode: $body", cause) {
+) :
+ M3terServiceException(
+ "$statusCode: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}",
+ cause,
+ ) {
override fun statusCode(): Int = statusCode
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/errors/NotFoundException.kt b/sdk-java-core/src/main/kotlin/com/m3ter/errors/NotFoundException.kt
index b45c01af..7e8663a8 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/errors/NotFoundException.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/errors/NotFoundException.kt
@@ -5,12 +5,16 @@ package com.m3ter.errors
import com.m3ter.core.JsonValue
import com.m3ter.core.checkRequired
import com.m3ter.core.http.Headers
+import com.m3ter.core.jsonMapper
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
class NotFoundException
private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) :
- M3terServiceException("404: $body", cause) {
+ M3terServiceException(
+ "404: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}",
+ cause,
+ ) {
override fun statusCode(): Int = 404
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/errors/PermissionDeniedException.kt b/sdk-java-core/src/main/kotlin/com/m3ter/errors/PermissionDeniedException.kt
index d16f5c99..b39a0d8b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/errors/PermissionDeniedException.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/errors/PermissionDeniedException.kt
@@ -5,12 +5,16 @@ package com.m3ter.errors
import com.m3ter.core.JsonValue
import com.m3ter.core.checkRequired
import com.m3ter.core.http.Headers
+import com.m3ter.core.jsonMapper
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
class PermissionDeniedException
private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) :
- M3terServiceException("403: $body", cause) {
+ M3terServiceException(
+ "403: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}",
+ cause,
+ ) {
override fun statusCode(): Int = 403
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/errors/RateLimitException.kt b/sdk-java-core/src/main/kotlin/com/m3ter/errors/RateLimitException.kt
index e3a30689..0022537d 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/errors/RateLimitException.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/errors/RateLimitException.kt
@@ -5,12 +5,16 @@ package com.m3ter.errors
import com.m3ter.core.JsonValue
import com.m3ter.core.checkRequired
import com.m3ter.core.http.Headers
+import com.m3ter.core.jsonMapper
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
class RateLimitException
private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) :
- M3terServiceException("429: $body", cause) {
+ M3terServiceException(
+ "429: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}",
+ cause,
+ ) {
override fun statusCode(): Int = 429
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/errors/UnauthorizedException.kt b/sdk-java-core/src/main/kotlin/com/m3ter/errors/UnauthorizedException.kt
index 135f6453..7bb19044 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/errors/UnauthorizedException.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/errors/UnauthorizedException.kt
@@ -5,12 +5,16 @@ package com.m3ter.errors
import com.m3ter.core.JsonValue
import com.m3ter.core.checkRequired
import com.m3ter.core.http.Headers
+import com.m3ter.core.jsonMapper
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
class UnauthorizedException
private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) :
- M3terServiceException("401: $body", cause) {
+ M3terServiceException(
+ "401: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}",
+ cause,
+ ) {
override fun statusCode(): Int = 401
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/errors/UnexpectedStatusCodeException.kt b/sdk-java-core/src/main/kotlin/com/m3ter/errors/UnexpectedStatusCodeException.kt
index cbb9c3d5..84b87282 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/errors/UnexpectedStatusCodeException.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/errors/UnexpectedStatusCodeException.kt
@@ -5,6 +5,7 @@ package com.m3ter.errors
import com.m3ter.core.JsonValue
import com.m3ter.core.checkRequired
import com.m3ter.core.http.Headers
+import com.m3ter.core.jsonMapper
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
@@ -14,7 +15,11 @@ private constructor(
private val headers: Headers,
private val body: JsonValue,
cause: Throwable?,
-) : M3terServiceException("$statusCode: $body", cause) {
+) :
+ M3terServiceException(
+ "$statusCode: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}",
+ cause,
+ ) {
override fun statusCode(): Int = statusCode
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/errors/UnprocessableEntityException.kt b/sdk-java-core/src/main/kotlin/com/m3ter/errors/UnprocessableEntityException.kt
index b46a0d4e..06dc6f07 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/errors/UnprocessableEntityException.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/errors/UnprocessableEntityException.kt
@@ -5,12 +5,16 @@ package com.m3ter.errors
import com.m3ter.core.JsonValue
import com.m3ter.core.checkRequired
import com.m3ter.core.http.Headers
+import com.m3ter.core.jsonMapper
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
class UnprocessableEntityException
private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) :
- M3terServiceException("422: $body", cause) {
+ M3terServiceException(
+ "422: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}",
+ cause,
+ ) {
override fun statusCode(): Int = 422
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountCreateParams.kt
index 3d836bc1..246d87a2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountCreateParams.kt
@@ -1624,6 +1624,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1832,6 +1841,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): AutoGenerateStatementMode = apply {
if (validated) {
return@apply
@@ -1963,6 +1981,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CreditApplicationOrder = apply {
if (validated) {
return@apply
@@ -2071,6 +2098,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountEndDateBillingEntitiesParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountEndDateBillingEntitiesParams.kt
index a7609ab5..85f42e69 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountEndDateBillingEntitiesParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountEndDateBillingEntitiesParams.kt
@@ -605,6 +605,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -766,6 +775,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillingEntity = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountEndDateBillingEntitiesResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountEndDateBillingEntitiesResponse.kt
index 11414a23..951cac60 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountEndDateBillingEntitiesResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountEndDateBillingEntitiesResponse.kt
@@ -217,6 +217,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): AccountEndDateBillingEntitiesResponse = apply {
if (validated) {
return@apply
@@ -490,6 +498,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): FailedEntities = apply {
if (validated) {
return@apply
@@ -799,6 +816,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): UpdatedEntities = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountListChildrenPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountListChildrenPageResponse.kt
index c38f4985..552294c7 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountListChildrenPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountListChildrenPageResponse.kt
@@ -167,6 +167,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): AccountListChildrenPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountListPageResponse.kt
index 76e3a97b..c959a369 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountListPageResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): AccountListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanCreateParams.kt
index bb2e5aef..410a72d2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanCreateParams.kt
@@ -1247,6 +1247,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1441,6 +1450,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ChildBillingMode = apply {
if (validated) {
return@apply
@@ -1549,6 +1567,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanListPageResponse.kt
index b2cfea29..6013bea9 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanListPageResponse.kt
@@ -164,6 +164,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): AccountPlanListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanResponse.kt
index bfcc9905..dabdf804 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanResponse.kt
@@ -805,6 +805,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): AccountPlanResponse = apply {
if (validated) {
return@apply
@@ -967,6 +975,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ChildBillingMode = apply {
if (validated) {
return@apply
@@ -1075,6 +1092,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanUpdateParams.kt
index 89874ef4..b327cf49 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountPlanUpdateParams.kt
@@ -1262,6 +1262,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1456,6 +1465,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ChildBillingMode = apply {
if (validated) {
return@apply
@@ -1564,6 +1582,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountResponse.kt
index 4d0969aa..f2983c8d 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountResponse.kt
@@ -942,6 +942,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): AccountResponse = apply {
if (validated) {
return@apply
@@ -1109,6 +1117,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): AutoGenerateStatementMode = apply {
if (validated) {
return@apply
@@ -1240,6 +1257,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CreditApplicationOrder = apply {
if (validated) {
return@apply
@@ -1348,6 +1374,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountSearchParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountSearchParams.kt
index 27526b77..d40aca58 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountSearchParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountSearchParams.kt
@@ -430,6 +430,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Operator = apply {
if (validated) {
return@apply
@@ -557,6 +566,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): SortOrder = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountSearchResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountSearchResponse.kt
index 851af85d..25688869 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountSearchResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountSearchResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): AccountSearchResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountUpdateParams.kt
index 93109e8b..597fd5dc 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AccountUpdateParams.kt
@@ -1642,6 +1642,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1850,6 +1859,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): AutoGenerateStatementMode = apply {
if (validated) {
return@apply
@@ -1981,6 +1999,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CreditApplicationOrder = apply {
if (validated) {
return@apply
@@ -2089,6 +2116,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AdHocOperationalDataRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AdHocOperationalDataRequest.kt
index d37e78e7..e3b6388e 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AdHocOperationalDataRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AdHocOperationalDataRequest.kt
@@ -242,6 +242,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): AdHocOperationalDataRequest = apply {
if (validated) {
return@apply
@@ -471,6 +479,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): OperationalDataType = apply {
if (validated) {
return@apply
@@ -592,6 +609,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): SourceType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AdHocResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AdHocResponse.kt
index 5eeae4a3..4ead2615 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AdHocResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AdHocResponse.kt
@@ -113,6 +113,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): AdHocResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AdHocUsageDataRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AdHocUsageDataRequest.kt
index c42168c3..f0cfe2c0 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AdHocUsageDataRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AdHocUsageDataRequest.kt
@@ -479,6 +479,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): AdHocUsageDataRequest = apply {
if (validated) {
return@apply
@@ -602,6 +610,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): SourceType = apply {
if (validated) {
return@apply
@@ -866,6 +883,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Aggregation = apply {
if (validated) {
return@apply
@@ -993,6 +1019,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): FieldType = apply {
if (validated) {
return@apply
@@ -1154,6 +1190,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Function = apply {
if (validated) {
return@apply
@@ -1417,6 +1463,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): DimensionFilter = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/Address.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/Address.kt
index 8439ea0f..792a8690 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/Address.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/Address.kt
@@ -348,6 +348,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): Address = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationCreateParams.kt
index 3057edb5..9d8ebe65 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationCreateParams.kt
@@ -1709,6 +1709,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1964,6 +1973,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Aggregation = apply {
if (validated) {
return@apply
@@ -2114,6 +2132,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Rounding = apply {
if (validated) {
return@apply
@@ -2210,6 +2237,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
@@ -2309,6 +2345,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Segment = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationListPageResponse.kt
index 4c7fd29c..76170014 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationListPageResponse.kt
@@ -164,6 +164,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): AggregationListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationResponse.kt
index a2ccafd9..17bcf697 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationResponse.kt
@@ -985,6 +985,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): AggregationResponse = apply {
if (validated) {
return@apply
@@ -1198,6 +1206,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Aggregation = apply {
if (validated) {
return@apply
@@ -1294,6 +1311,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
@@ -1447,6 +1473,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Rounding = apply {
if (validated) {
return@apply
@@ -1543,6 +1578,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Segment = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationUpdateParams.kt
index cf491a7a..a4387bea 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AggregationUpdateParams.kt
@@ -1727,6 +1727,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1982,6 +1991,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Aggregation = apply {
if (validated) {
return@apply
@@ -2132,6 +2150,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Rounding = apply {
if (validated) {
return@apply
@@ -2228,6 +2255,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
@@ -2327,6 +2363,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Segment = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AuthenticationGetBearerTokenParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AuthenticationGetBearerTokenParams.kt
index e155b2e0..20557cbe 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AuthenticationGetBearerTokenParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AuthenticationGetBearerTokenParams.kt
@@ -427,6 +427,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -558,6 +567,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): GrantType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/AuthenticationGetBearerTokenResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/AuthenticationGetBearerTokenResponse.kt
index d730088f..5c49d87b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/AuthenticationGetBearerTokenResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/AuthenticationGetBearerTokenResponse.kt
@@ -236,6 +236,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): AuthenticationGetBearerTokenResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/Balance.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/Balance.kt
index d2000e0c..4e728b08 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/Balance.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/Balance.kt
@@ -1157,6 +1157,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): Balance = apply {
if (validated) {
return@apply
@@ -1303,6 +1311,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
@@ -1458,6 +1475,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleCreateParams.kt
index 46d8e492..99a1726b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleCreateParams.kt
@@ -1510,6 +1510,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1719,6 +1728,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillFrequency = apply {
if (validated) {
return@apply
@@ -1827,6 +1845,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleCreateResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleCreateResponse.kt
index 72f6456b..cbbd6b9a 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleCreateResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleCreateResponse.kt
@@ -1015,6 +1015,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BalanceChargeScheduleCreateResponse = apply {
if (validated) {
return@apply
@@ -1188,6 +1196,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillFrequency = apply {
if (validated) {
return@apply
@@ -1296,6 +1313,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleDeleteResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleDeleteResponse.kt
index 2dee86ea..8925ec16 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleDeleteResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleDeleteResponse.kt
@@ -1015,6 +1015,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BalanceChargeScheduleDeleteResponse = apply {
if (validated) {
return@apply
@@ -1188,6 +1196,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillFrequency = apply {
if (validated) {
return@apply
@@ -1296,6 +1313,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleListPageResponse.kt
index 7888086f..362e863c 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleListPageResponse.kt
@@ -170,6 +170,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BalanceChargeScheduleListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleListResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleListResponse.kt
index 9b2abb34..fc5e89a6 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleListResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleListResponse.kt
@@ -1014,6 +1014,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BalanceChargeScheduleListResponse = apply {
if (validated) {
return@apply
@@ -1187,6 +1195,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillFrequency = apply {
if (validated) {
return@apply
@@ -1295,6 +1312,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeSchedulePreviewParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeSchedulePreviewParams.kt
index 01206270..22fbeec2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeSchedulePreviewParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeSchedulePreviewParams.kt
@@ -1553,6 +1553,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1762,6 +1771,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillFrequency = apply {
if (validated) {
return@apply
@@ -1870,6 +1888,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeSchedulePreviewResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeSchedulePreviewResponse.kt
index 548e6bd6..d1f2e2a7 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeSchedulePreviewResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeSchedulePreviewResponse.kt
@@ -1015,6 +1015,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BalanceChargeSchedulePreviewResponse = apply {
if (validated) {
return@apply
@@ -1188,6 +1196,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillFrequency = apply {
if (validated) {
return@apply
@@ -1296,6 +1313,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleRetrieveResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleRetrieveResponse.kt
index ee13daf5..2ed2f002 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleRetrieveResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleRetrieveResponse.kt
@@ -1015,6 +1015,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BalanceChargeScheduleRetrieveResponse = apply {
if (validated) {
return@apply
@@ -1188,6 +1196,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillFrequency = apply {
if (validated) {
return@apply
@@ -1296,6 +1313,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleUpdateParams.kt
index 7650c814..0b9e59c1 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleUpdateParams.kt
@@ -1521,6 +1521,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1730,6 +1739,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillFrequency = apply {
if (validated) {
return@apply
@@ -1838,6 +1856,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleUpdateResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleUpdateResponse.kt
index b2365627..e0939070 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleUpdateResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceChargeScheduleUpdateResponse.kt
@@ -1015,6 +1015,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BalanceChargeScheduleUpdateResponse = apply {
if (validated) {
return@apply
@@ -1188,6 +1196,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillFrequency = apply {
if (validated) {
return@apply
@@ -1296,6 +1313,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceCreateParams.kt
index 22b6720a..dec9fdca 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceCreateParams.kt
@@ -2037,6 +2037,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -2233,6 +2242,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
@@ -2388,6 +2406,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceListPageResponse.kt
index f14fd03c..3ed7809a 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceListPageResponse.kt
@@ -160,6 +160,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BalanceListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionCreateParams.kt
index 33b0f772..414f1984 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionCreateParams.kt
@@ -925,6 +925,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionListPageResponse.kt
index e9058b2a..3f0ba0c3 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionListPageResponse.kt
@@ -167,6 +167,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BalanceTransactionListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionListParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionListParams.kt
index 5a479163..9bf2e4cc 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionListParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionListParams.kt
@@ -392,6 +392,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): EntityType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionScheduleListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionScheduleListPageResponse.kt
index 2511b50c..6a65628b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionScheduleListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionScheduleListPageResponse.kt
@@ -168,6 +168,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BalanceTransactionScheduleListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionSummaryResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionSummaryResponse.kt
index 4c80c45d..a3023eed 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionSummaryResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceTransactionSummaryResponse.kt
@@ -330,6 +330,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BalanceTransactionSummaryResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceUpdateParams.kt
index f37d09ac..6dfeef48 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BalanceUpdateParams.kt
@@ -2049,6 +2049,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -2245,6 +2254,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
@@ -2400,6 +2418,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillApproveParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillApproveParams.kt
index 6e7cd826..b4a1129f 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillApproveParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillApproveParams.kt
@@ -496,6 +496,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillApproveResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillApproveResponse.kt
index ac14d45f..d09eb04b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillApproveResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillApproveResponse.kt
@@ -117,6 +117,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BillApproveResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillConfigResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillConfigResponse.kt
index eec85daa..76ce5b9c 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillConfigResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillConfigResponse.kt
@@ -370,6 +370,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BillConfigResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillConfigUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillConfigUpdateParams.kt
index c4c61ffe..4d1b22b2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillConfigUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillConfigUpdateParams.kt
@@ -454,6 +454,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillCreditLineItemCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillCreditLineItemCreateParams.kt
index b4ad0926..ff9e1182 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillCreditLineItemCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillCreditLineItemCreateParams.kt
@@ -1272,6 +1272,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1561,6 +1570,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillCreditLineItemListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillCreditLineItemListPageResponse.kt
index 669b863b..604e9ca1 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillCreditLineItemListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillCreditLineItemListPageResponse.kt
@@ -169,6 +169,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BillCreditLineItemListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillCreditLineItemUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillCreditLineItemUpdateParams.kt
index 5fe24e29..8f1d61c6 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillCreditLineItemUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillCreditLineItemUpdateParams.kt
@@ -1278,6 +1278,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1567,6 +1576,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillDebitLineItemCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillDebitLineItemCreateParams.kt
index 2d35a191..6cccb7ca 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillDebitLineItemCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillDebitLineItemCreateParams.kt
@@ -1271,6 +1271,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1560,6 +1569,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillDebitLineItemListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillDebitLineItemListPageResponse.kt
index 5fc958b3..f387872b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillDebitLineItemListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillDebitLineItemListPageResponse.kt
@@ -167,6 +167,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BillDebitLineItemListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillDebitLineItemUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillDebitLineItemUpdateParams.kt
index 73516b71..306da653 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillDebitLineItemUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillDebitLineItemUpdateParams.kt
@@ -1277,6 +1277,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1566,6 +1575,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobCreateParams.kt
index ce40fdd5..dca98259 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobCreateParams.kt
@@ -1615,6 +1615,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1841,6 +1850,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillingFrequency = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobListPageResponse.kt
index d81636ab..d51905b9 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobListPageResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BillJobListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobRecalculateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobRecalculateParams.kt
index 309ba80c..a6d69064 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobRecalculateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobRecalculateParams.kt
@@ -502,6 +502,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobResponse.kt
index 38a5ecf0..1f6c1007 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillJobResponse.kt
@@ -1160,6 +1160,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BillJobResponse = apply {
if (validated) {
return@apply
@@ -1354,6 +1362,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillingFrequency = apply {
if (validated) {
return@apply
@@ -1497,6 +1514,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
@@ -1626,6 +1652,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Type = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillLineItemListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillLineItemListPageResponse.kt
index 336f7551..d2cec68d 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillLineItemListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillLineItemListPageResponse.kt
@@ -164,6 +164,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BillLineItemListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillListPageResponse.kt
index 7f0eb678..96abb0db 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillListPageResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BillListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillListParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillListParams.kt
index 483aeb88..a0edf6b2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillListParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillListParams.kt
@@ -587,6 +587,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillResponse.kt
index 97554d54..4cd57c5b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillResponse.kt
@@ -1502,6 +1502,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BillResponse = apply {
if (validated) {
return@apply
@@ -1714,6 +1722,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillingFrequency = apply {
if (validated) {
return@apply
@@ -3411,6 +3428,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItem = apply {
if (validated) {
return@apply
@@ -3713,6 +3739,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
@@ -3812,6 +3848,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Additional = apply {
if (validated) {
return@apply
@@ -3914,6 +3960,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Group = apply {
if (validated) {
return@apply
@@ -4020,6 +4076,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Segment = apply {
if (validated) {
return@apply
@@ -4542,6 +4608,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): UsagePerPricingBand = apply {
if (validated) {
return@apply
@@ -4817,6 +4893,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillSearchParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillSearchParams.kt
index ade83651..1e4d011a 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillSearchParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillSearchParams.kt
@@ -430,6 +430,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Operator = apply {
if (validated) {
return@apply
@@ -557,6 +566,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): SortOrder = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillSearchResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillSearchResponse.kt
index c40a2a4e..3e912f56 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillSearchResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillSearchResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): BillSearchResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillUpdateStatusParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillUpdateStatusParams.kt
index 90165537..d078cdf1 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/BillUpdateStatusParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/BillUpdateStatusParams.kt
@@ -396,6 +396,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -525,6 +534,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeCreateParams.kt
index 574033a7..cd20891b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeCreateParams.kt
@@ -1605,6 +1605,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1812,6 +1821,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): EntityType = apply {
if (validated) {
return@apply
@@ -1940,6 +1958,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeCreateResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeCreateResponse.kt
index 1483025d..0b90eb5b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeCreateResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeCreateResponse.kt
@@ -20,6 +20,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
+/** Response containing a Charge entity */
class ChargeCreateResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -1016,6 +1017,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ChargeCreateResponse = apply {
if (validated) {
return@apply
@@ -1179,6 +1188,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): EntityType = apply {
if (validated) {
return@apply
@@ -1307,6 +1325,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeDeleteResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeDeleteResponse.kt
index 547e794e..b227d66e 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeDeleteResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeDeleteResponse.kt
@@ -20,6 +20,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
+/** Response containing a Charge entity */
class ChargeDeleteResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -1016,6 +1017,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ChargeDeleteResponse = apply {
if (validated) {
return@apply
@@ -1179,6 +1188,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): EntityType = apply {
if (validated) {
return@apply
@@ -1307,6 +1325,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeListPageResponse.kt
index 21ed91db..955f1e2f 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeListPageResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ChargeListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeListParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeListParams.kt
index 370d9c34..39e37214 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeListParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeListParams.kt
@@ -404,6 +404,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): EntityType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeListResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeListResponse.kt
index 6164b26d..13ea0046 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeListResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeListResponse.kt
@@ -1016,6 +1016,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ChargeListResponse = apply {
if (validated) {
return@apply
@@ -1179,6 +1187,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): EntityType = apply {
if (validated) {
return@apply
@@ -1307,6 +1324,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeRetrieveResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeRetrieveResponse.kt
index 9df022e6..7d686b01 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeRetrieveResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeRetrieveResponse.kt
@@ -20,6 +20,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
+/** Response containing a Charge entity */
class ChargeRetrieveResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -1016,6 +1017,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ChargeRetrieveResponse = apply {
if (validated) {
return@apply
@@ -1179,6 +1188,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): EntityType = apply {
if (validated) {
return@apply
@@ -1307,6 +1325,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeUpdateParams.kt
index d17b9210..935970f5 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeUpdateParams.kt
@@ -1612,6 +1612,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1819,6 +1828,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): EntityType = apply {
if (validated) {
return@apply
@@ -1947,6 +1965,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeUpdateResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeUpdateResponse.kt
index 816af710..6c47e561 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeUpdateResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ChargeUpdateResponse.kt
@@ -20,6 +20,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
+/** Response containing a Charge entity */
class ChargeUpdateResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -1016,6 +1017,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ChargeUpdateResponse = apply {
if (validated) {
return@apply
@@ -1179,6 +1188,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): EntityType = apply {
if (validated) {
return@apply
@@ -1307,6 +1325,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentCreateParams.kt
index 29200327..fc7d03f2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentCreateParams.kt
@@ -2624,6 +2624,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -2878,6 +2887,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ChildBillingMode = apply {
if (validated) {
return@apply
@@ -3024,6 +3042,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentFee.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentFee.kt
index e9f00da0..0328ca47 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentFee.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentFee.kt
@@ -239,6 +239,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CommitmentFee = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentListPageResponse.kt
index 223b70be..ec31c1d5 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentListPageResponse.kt
@@ -164,6 +164,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CommitmentListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentResponse.kt
index a2ff8b1e..3b5292f1 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentResponse.kt
@@ -1479,6 +1479,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CommitmentResponse = apply {
if (validated) {
return@apply
@@ -1671,6 +1679,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ChildBillingMode = apply {
if (validated) {
return@apply
@@ -1817,6 +1834,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentSearchParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentSearchParams.kt
index a43d0762..d9d58dde 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentSearchParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentSearchParams.kt
@@ -430,6 +430,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Operator = apply {
if (validated) {
return@apply
@@ -557,6 +566,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): SortOrder = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentSearchResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentSearchResponse.kt
index d1bc05de..92d2b77c 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentSearchResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentSearchResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CommitmentSearchResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentUpdateParams.kt
index 9ebc2247..caf3b44b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CommitmentUpdateParams.kt
@@ -2628,6 +2628,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -2882,6 +2891,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ChildBillingMode = apply {
if (validated) {
return@apply
@@ -3028,6 +3046,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationCreateParams.kt
index 1b1371f9..7c262bf3 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationCreateParams.kt
@@ -1263,6 +1263,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1465,6 +1474,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Rounding = apply {
if (validated) {
return@apply
@@ -1561,6 +1579,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationListPageResponse.kt
index e1bc831b..fde7d092 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationListPageResponse.kt
@@ -170,6 +170,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CompoundAggregationListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationResponse.kt
index fa69a49e..a00fbea4 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationResponse.kt
@@ -803,6 +803,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CompoundAggregationResponse = apply {
if (validated) {
return@apply
@@ -919,6 +927,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
@@ -1072,6 +1089,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Rounding = apply {
if (validated) {
return@apply
@@ -1168,6 +1194,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Segment = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationUpdateParams.kt
index a8d851a8..03090207 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CompoundAggregationUpdateParams.kt
@@ -1280,6 +1280,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1482,6 +1491,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Rounding = apply {
if (validated) {
return@apply
@@ -1578,6 +1596,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractCreateParams.kt
index b12d4cef..0d48da80 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractCreateParams.kt
@@ -1331,6 +1331,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1495,6 +1504,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
@@ -1719,6 +1737,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): UsageFilter = apply {
if (validated) {
return@apply
@@ -1839,6 +1866,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Mode = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractEndDateBillingEntitiesParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractEndDateBillingEntitiesParams.kt
index f7c5abdd..1917be58 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractEndDateBillingEntitiesParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractEndDateBillingEntitiesParams.kt
@@ -611,6 +611,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -772,6 +781,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillingEntity = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractEndDateBillingEntitiesResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractEndDateBillingEntitiesResponse.kt
index 5326da6f..b364a7df 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractEndDateBillingEntitiesResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractEndDateBillingEntitiesResponse.kt
@@ -217,6 +217,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ContractEndDateBillingEntitiesResponse = apply {
if (validated) {
return@apply
@@ -490,6 +498,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): FailedEntities = apply {
if (validated) {
return@apply
@@ -799,6 +816,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): UpdatedEntities = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractListPageResponse.kt
index cfd2ef49..b9e6f377 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractListPageResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ContractListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractResponse.kt
index 39a1fc2a..36b05776 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractResponse.kt
@@ -796,6 +796,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ContractResponse = apply {
if (validated) {
return@apply
@@ -924,6 +932,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
@@ -1148,6 +1165,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): UsageFilter = apply {
if (validated) {
return@apply
@@ -1268,6 +1294,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Mode = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractUpdateParams.kt
index b3011060..5cf7fdfa 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ContractUpdateParams.kt
@@ -1346,6 +1346,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1510,6 +1519,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
@@ -1734,6 +1752,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): UsageFilter = apply {
if (validated) {
return@apply
@@ -1854,6 +1881,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Mode = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentCreateParams.kt
index c58c36d6..e468fae9 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentCreateParams.kt
@@ -784,6 +784,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentListPageResponse.kt
index fa9448c7..fb675614 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentListPageResponse.kt
@@ -169,6 +169,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CounterAdjustmentListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentResponse.kt
index 85a3a108..6ab4f1c2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentResponse.kt
@@ -499,6 +499,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CounterAdjustmentResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentUpdateParams.kt
index 6ab83efb..b447c551 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterAdjustmentUpdateParams.kt
@@ -786,6 +786,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterCreateParams.kt
index ce564b6b..f5c129ee 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterCreateParams.kt
@@ -667,6 +667,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterListPageResponse.kt
index 33602666..61179bdd 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterListPageResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CounterListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingCreateParams.kt
index fe51f9bd..3867afa3 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingCreateParams.kt
@@ -1555,6 +1555,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingListPageResponse.kt
index 2045d3ef..7abc5f83 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingListPageResponse.kt
@@ -168,6 +168,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CounterPricingListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingResponse.kt
index 31376195..18ad1c2e 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingResponse.kt
@@ -923,6 +923,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CounterPricingResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingUpdateParams.kt
index a6e55359..37a15a71 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterPricingUpdateParams.kt
@@ -1567,6 +1567,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterResponse.kt
index 49196532..5fbec0e2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterResponse.kt
@@ -463,6 +463,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CounterResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterUpdateParams.kt
index 1823f70a..4279df9e 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CounterUpdateParams.kt
@@ -679,6 +679,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditLineItemResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditLineItemResponse.kt
index dea5d87e..ef620951 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditLineItemResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditLineItemResponse.kt
@@ -650,6 +650,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CreditLineItemResponse = apply {
if (validated) {
return@apply
@@ -895,6 +903,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonCreateParams.kt
index 6a70af89..e29a4841 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonCreateParams.kt
@@ -603,6 +603,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonListPageResponse.kt
index ed54121e..211ffc3b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonListPageResponse.kt
@@ -164,6 +164,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CreditReasonListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonResponse.kt
index fd5464b9..1ea65ae2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonResponse.kt
@@ -425,6 +425,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CreditReasonResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonUpdateParams.kt
index c9b8496c..0faf003e 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CreditReasonUpdateParams.kt
@@ -611,6 +611,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyConversion.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyConversion.kt
index 983300a5..988a45f2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyConversion.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyConversion.kt
@@ -201,6 +201,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CurrencyConversion = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyCreateParams.kt
index 4330aec2..f8211983 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyCreateParams.kt
@@ -740,6 +740,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -935,6 +944,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): RoundingMode = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyListPageResponse.kt
index 5877dc3e..cd122a06 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyListPageResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CurrencyListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyResponse.kt
index 57f08d0f..d3605610 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyResponse.kt
@@ -504,6 +504,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CurrencyResponse = apply {
if (validated) {
return@apply
@@ -675,6 +683,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): RoundingMode = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyUpdateParams.kt
index dcb89dd3..a8672d48 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CurrencyUpdateParams.kt
@@ -752,6 +752,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -947,6 +956,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): RoundingMode = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CustomFieldUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CustomFieldUpdateParams.kt
index b173908c..6663ca49 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CustomFieldUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CustomFieldUpdateParams.kt
@@ -1031,6 +1031,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1180,6 +1189,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Account = apply {
if (validated) {
return@apply
@@ -1280,6 +1298,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): AccountPlan = apply {
if (validated) {
return@apply
@@ -1380,6 +1407,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Aggregation = apply {
if (validated) {
return@apply
@@ -1481,6 +1517,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CompoundAggregation = apply {
if (validated) {
return@apply
@@ -1582,6 +1627,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Contract = apply {
if (validated) {
return@apply
@@ -1682,6 +1736,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Meter = apply {
if (validated) {
return@apply
@@ -1782,6 +1845,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Organization = apply {
if (validated) {
return@apply
@@ -1882,6 +1954,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Plan = apply {
if (validated) {
return@apply
@@ -1982,6 +2063,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PlanTemplate = apply {
if (validated) {
return@apply
@@ -2082,6 +2172,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Product = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/CustomFieldsResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/CustomFieldsResponse.kt
index 52ff3465..299cf5b4 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/CustomFieldsResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/CustomFieldsResponse.kt
@@ -689,6 +689,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): CustomFieldsResponse = apply {
if (validated) {
return@apply
@@ -804,6 +812,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Account = apply {
if (validated) {
return@apply
@@ -904,6 +921,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): AccountPlan = apply {
if (validated) {
return@apply
@@ -1004,6 +1030,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Aggregation = apply {
if (validated) {
return@apply
@@ -1105,6 +1140,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CompoundAggregation = apply {
if (validated) {
return@apply
@@ -1206,6 +1250,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Contract = apply {
if (validated) {
return@apply
@@ -1306,6 +1359,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Meter = apply {
if (validated) {
return@apply
@@ -1406,6 +1468,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Organization = apply {
if (validated) {
return@apply
@@ -1506,6 +1577,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Plan = apply {
if (validated) {
return@apply
@@ -1606,6 +1686,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PlanTemplate = apply {
if (validated) {
return@apply
@@ -1706,6 +1795,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Product = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerAccountGroup.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerAccountGroup.kt
index 4dfe51ca..584a4f1e 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerAccountGroup.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerAccountGroup.kt
@@ -123,6 +123,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExplorerAccountGroup = apply {
if (validated) {
return@apply
@@ -241,6 +249,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): GroupType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerDimensionGroup.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerDimensionGroup.kt
index 4324e968..22c7a7a1 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerDimensionGroup.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerDimensionGroup.kt
@@ -206,6 +206,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExplorerDimensionGroup = apply {
if (validated) {
return@apply
@@ -330,6 +338,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): GroupType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerGroup.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerGroup.kt
index 5cea7a59..e4c18686 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerGroup.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerGroup.kt
@@ -116,6 +116,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExplorerGroup = apply {
if (validated) {
return@apply
@@ -234,6 +242,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): GroupType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerTimeGroup.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerTimeGroup.kt
index 372eb1dc..9f5b1264 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerTimeGroup.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExplorerTimeGroup.kt
@@ -175,6 +175,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExplorerTimeGroup = apply {
if (validated) {
return@apply
@@ -310,6 +318,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Frequency = apply {
if (validated) {
return@apply
@@ -442,6 +459,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): GroupType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportCreateAdhocParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportCreateAdhocParams.kt
index bb0bdb20..eac9eabb 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportCreateAdhocParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportCreateAdhocParams.kt
@@ -301,6 +301,35 @@ private constructor(
fun _json(): Optional = Optional.ofNullable(_json)
+ /**
+ * Maps this instance's current variant to a value of type [T] using the given [visitor].
+ *
+ * Note that this method is _not_ forwards compatible with new variants from the API, unless
+ * [visitor] overrides [Visitor.unknown]. To handle variants not known to this version of
+ * the SDK gracefully, consider overriding [Visitor.unknown]:
+ * ```java
+ * import com.m3ter.core.JsonValue;
+ * import java.util.Optional;
+ *
+ * Optional result = body.accept(new Body.Visitor>() {
+ * @Override
+ * public Optional visitAdHocOperationalDataRequest(AdHocOperationalDataRequest adHocOperationalDataRequest) {
+ * return Optional.of(adHocOperationalDataRequest.toString());
+ * }
+ *
+ * // ...
+ *
+ * @Override
+ * public Optional unknown(JsonValue json) {
+ * // Or inspect the `json`.
+ * return Optional.empty();
+ * }
+ * });
+ * ```
+ *
+ * @throws M3terInvalidDataException if [Visitor.unknown] is not overridden in [visitor] and
+ * the current variant is unknown.
+ */
fun accept(visitor: Visitor): T =
when {
adHocOperationalDataRequest != null ->
@@ -312,6 +341,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationCreateParams.kt
index 614a69c9..7979a02d 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationCreateParams.kt
@@ -286,6 +286,35 @@ private constructor(
fun _json(): Optional = Optional.ofNullable(_json)
+ /**
+ * Maps this instance's current variant to a value of type [T] using the given [visitor].
+ *
+ * Note that this method is _not_ forwards compatible with new variants from the API, unless
+ * [visitor] overrides [Visitor.unknown]. To handle variants not known to this version of
+ * the SDK gracefully, consider overriding [Visitor.unknown]:
+ * ```java
+ * import com.m3ter.core.JsonValue;
+ * import java.util.Optional;
+ *
+ * Optional result = body.accept(new Body.Visitor>() {
+ * @Override
+ * public Optional visitDataExportDestinationS3Request(DataExportDestinationS3Request dataExportDestinationS3Request) {
+ * return Optional.of(dataExportDestinationS3Request.toString());
+ * }
+ *
+ * // ...
+ *
+ * @Override
+ * public Optional unknown(JsonValue json) {
+ * // Or inspect the `json`.
+ * return Optional.empty();
+ * }
+ * });
+ * ```
+ *
+ * @throws M3terInvalidDataException if [Visitor.unknown] is not overridden in [visitor] and
+ * the current variant is unknown.
+ */
fun accept(visitor: Visitor): T =
when {
dataExportDestinationS3Request != null ->
@@ -299,6 +328,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationCreateResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationCreateResponse.kt
index c1b3dcce..f499e192 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationCreateResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationCreateResponse.kt
@@ -63,6 +63,35 @@ private constructor(
fun _json(): Optional = Optional.ofNullable(_json)
+ /**
+ * Maps this instance's current variant to a value of type [T] using the given [visitor].
+ *
+ * Note that this method is _not_ forwards compatible with new variants from the API, unless
+ * [visitor] overrides [Visitor.unknown]. To handle variants not known to this version of the
+ * SDK gracefully, consider overriding [Visitor.unknown]:
+ * ```java
+ * import com.m3ter.core.JsonValue;
+ * import java.util.Optional;
+ *
+ * Optional result = dataExportDestinationCreateResponse.accept(new DataExportDestinationCreateResponse.Visitor>() {
+ * @Override
+ * public Optional visitExportDestinationS3(ExportDestinationS3Response exportDestinationS3) {
+ * return Optional.of(exportDestinationS3.toString());
+ * }
+ *
+ * // ...
+ *
+ * @Override
+ * public Optional unknown(JsonValue json) {
+ * // Or inspect the `json`.
+ * return Optional.empty();
+ * }
+ * });
+ * ```
+ *
+ * @throws M3terInvalidDataException if [Visitor.unknown] is not overridden in [visitor] and the
+ * current variant is unknown.
+ */
fun accept(visitor: Visitor): T =
when {
exportDestinationS3 != null -> visitor.visitExportDestinationS3(exportDestinationS3)
@@ -75,6 +104,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportDestinationCreateResponse = apply {
if (validated) {
return@apply
@@ -201,6 +238,10 @@ private constructor(
override fun ObjectCodec.deserialize(node: JsonNode): DataExportDestinationCreateResponse {
val json = JsonValue.fromJsonNode(node)
+ val destinationType =
+ json.asObject().getOrNull()?.get("destinationType")?.asString()?.getOrNull()
+
+ when (destinationType) {}
val bestMatches =
sequenceOf(
@@ -880,6 +921,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ExportDestinationS3Response = apply {
if (validated) {
return@apply
@@ -1040,6 +1090,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PartitionOrder = apply {
if (validated) {
return@apply
@@ -1860,6 +1920,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ExportDestinationGoogleCloudStorageResponse = apply {
if (validated) {
return@apply
@@ -2026,6 +2095,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PartitionOrder = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationDeleteResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationDeleteResponse.kt
index 3dd32606..0f8ba3be 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationDeleteResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationDeleteResponse.kt
@@ -63,6 +63,35 @@ private constructor(
fun _json(): Optional = Optional.ofNullable(_json)
+ /**
+ * Maps this instance's current variant to a value of type [T] using the given [visitor].
+ *
+ * Note that this method is _not_ forwards compatible with new variants from the API, unless
+ * [visitor] overrides [Visitor.unknown]. To handle variants not known to this version of the
+ * SDK gracefully, consider overriding [Visitor.unknown]:
+ * ```java
+ * import com.m3ter.core.JsonValue;
+ * import java.util.Optional;
+ *
+ * Optional result = dataExportDestinationDeleteResponse.accept(new DataExportDestinationDeleteResponse.Visitor>() {
+ * @Override
+ * public Optional visitExportDestinationS3(ExportDestinationS3Response exportDestinationS3) {
+ * return Optional.of(exportDestinationS3.toString());
+ * }
+ *
+ * // ...
+ *
+ * @Override
+ * public Optional unknown(JsonValue json) {
+ * // Or inspect the `json`.
+ * return Optional.empty();
+ * }
+ * });
+ * ```
+ *
+ * @throws M3terInvalidDataException if [Visitor.unknown] is not overridden in [visitor] and the
+ * current variant is unknown.
+ */
fun accept(visitor: Visitor): T =
when {
exportDestinationS3 != null -> visitor.visitExportDestinationS3(exportDestinationS3)
@@ -75,6 +104,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportDestinationDeleteResponse = apply {
if (validated) {
return@apply
@@ -201,6 +238,10 @@ private constructor(
override fun ObjectCodec.deserialize(node: JsonNode): DataExportDestinationDeleteResponse {
val json = JsonValue.fromJsonNode(node)
+ val destinationType =
+ json.asObject().getOrNull()?.get("destinationType")?.asString()?.getOrNull()
+
+ when (destinationType) {}
val bestMatches =
sequenceOf(
@@ -880,6 +921,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ExportDestinationS3Response = apply {
if (validated) {
return@apply
@@ -1040,6 +1090,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PartitionOrder = apply {
if (validated) {
return@apply
@@ -1860,6 +1920,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ExportDestinationGoogleCloudStorageResponse = apply {
if (validated) {
return@apply
@@ -2026,6 +2095,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PartitionOrder = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationGoogleCloudStorageRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationGoogleCloudStorageRequest.kt
index f49b29db..afd0353a 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationGoogleCloudStorageRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationGoogleCloudStorageRequest.kt
@@ -485,6 +485,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportDestinationGoogleCloudStorageRequest = apply {
if (validated) {
return@apply
@@ -612,6 +620,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): DestinationType = apply {
if (validated) {
return@apply
@@ -755,6 +772,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PartitionOrder = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationListPageResponse.kt
index b992c753..a046053c 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationListPageResponse.kt
@@ -170,6 +170,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportDestinationListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationResponse.kt
index 3e0ffcf8..ee9b952b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationResponse.kt
@@ -429,6 +429,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportDestinationResponse = apply {
if (validated) {
return@apply
@@ -561,6 +569,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): DestinationType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationRetrieveResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationRetrieveResponse.kt
index 1adfb233..5ea020c2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationRetrieveResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationRetrieveResponse.kt
@@ -63,6 +63,35 @@ private constructor(
fun _json(): Optional = Optional.ofNullable(_json)
+ /**
+ * Maps this instance's current variant to a value of type [T] using the given [visitor].
+ *
+ * Note that this method is _not_ forwards compatible with new variants from the API, unless
+ * [visitor] overrides [Visitor.unknown]. To handle variants not known to this version of the
+ * SDK gracefully, consider overriding [Visitor.unknown]:
+ * ```java
+ * import com.m3ter.core.JsonValue;
+ * import java.util.Optional;
+ *
+ * Optional result = dataExportDestinationRetrieveResponse.accept(new DataExportDestinationRetrieveResponse.Visitor>() {
+ * @Override
+ * public Optional visitExportDestinationS3(ExportDestinationS3Response exportDestinationS3) {
+ * return Optional.of(exportDestinationS3.toString());
+ * }
+ *
+ * // ...
+ *
+ * @Override
+ * public Optional unknown(JsonValue json) {
+ * // Or inspect the `json`.
+ * return Optional.empty();
+ * }
+ * });
+ * ```
+ *
+ * @throws M3terInvalidDataException if [Visitor.unknown] is not overridden in [visitor] and the
+ * current variant is unknown.
+ */
fun accept(visitor: Visitor): T =
when {
exportDestinationS3 != null -> visitor.visitExportDestinationS3(exportDestinationS3)
@@ -75,6 +104,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportDestinationRetrieveResponse = apply {
if (validated) {
return@apply
@@ -204,6 +241,10 @@ private constructor(
node: JsonNode
): DataExportDestinationRetrieveResponse {
val json = JsonValue.fromJsonNode(node)
+ val destinationType =
+ json.asObject().getOrNull()?.get("destinationType")?.asString()?.getOrNull()
+
+ when (destinationType) {}
val bestMatches =
sequenceOf(
@@ -883,6 +924,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ExportDestinationS3Response = apply {
if (validated) {
return@apply
@@ -1043,6 +1093,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PartitionOrder = apply {
if (validated) {
return@apply
@@ -1863,6 +1923,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ExportDestinationGoogleCloudStorageResponse = apply {
if (validated) {
return@apply
@@ -2029,6 +2098,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PartitionOrder = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationS3Request.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationS3Request.kt
index 5b2d87b5..6647b3a4 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationS3Request.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationS3Request.kt
@@ -399,6 +399,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportDestinationS3Request = apply {
if (validated) {
return@apply
@@ -520,6 +528,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): DestinationType = apply {
if (validated) {
return@apply
@@ -663,6 +680,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PartitionOrder = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationUpdateParams.kt
index be0a46ad..dd0f11ef 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationUpdateParams.kt
@@ -298,6 +298,35 @@ private constructor(
fun _json(): Optional = Optional.ofNullable(_json)
+ /**
+ * Maps this instance's current variant to a value of type [T] using the given [visitor].
+ *
+ * Note that this method is _not_ forwards compatible with new variants from the API, unless
+ * [visitor] overrides [Visitor.unknown]. To handle variants not known to this version of
+ * the SDK gracefully, consider overriding [Visitor.unknown]:
+ * ```java
+ * import com.m3ter.core.JsonValue;
+ * import java.util.Optional;
+ *
+ * Optional result = body.accept(new Body.Visitor>() {
+ * @Override
+ * public Optional visitDataExportDestinationS3Request(DataExportDestinationS3Request dataExportDestinationS3Request) {
+ * return Optional.of(dataExportDestinationS3Request.toString());
+ * }
+ *
+ * // ...
+ *
+ * @Override
+ * public Optional unknown(JsonValue json) {
+ * // Or inspect the `json`.
+ * return Optional.empty();
+ * }
+ * });
+ * ```
+ *
+ * @throws M3terInvalidDataException if [Visitor.unknown] is not overridden in [visitor] and
+ * the current variant is unknown.
+ */
fun accept(visitor: Visitor): T =
when {
dataExportDestinationS3Request != null ->
@@ -311,6 +340,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationUpdateResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationUpdateResponse.kt
index 837a8654..c9560d2f 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationUpdateResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportDestinationUpdateResponse.kt
@@ -63,6 +63,35 @@ private constructor(
fun _json(): Optional = Optional.ofNullable(_json)
+ /**
+ * Maps this instance's current variant to a value of type [T] using the given [visitor].
+ *
+ * Note that this method is _not_ forwards compatible with new variants from the API, unless
+ * [visitor] overrides [Visitor.unknown]. To handle variants not known to this version of the
+ * SDK gracefully, consider overriding [Visitor.unknown]:
+ * ```java
+ * import com.m3ter.core.JsonValue;
+ * import java.util.Optional;
+ *
+ * Optional result = dataExportDestinationUpdateResponse.accept(new DataExportDestinationUpdateResponse.Visitor>() {
+ * @Override
+ * public Optional visitExportDestinationS3(ExportDestinationS3Response exportDestinationS3) {
+ * return Optional.of(exportDestinationS3.toString());
+ * }
+ *
+ * // ...
+ *
+ * @Override
+ * public Optional unknown(JsonValue json) {
+ * // Or inspect the `json`.
+ * return Optional.empty();
+ * }
+ * });
+ * ```
+ *
+ * @throws M3terInvalidDataException if [Visitor.unknown] is not overridden in [visitor] and the
+ * current variant is unknown.
+ */
fun accept(visitor: Visitor): T =
when {
exportDestinationS3 != null -> visitor.visitExportDestinationS3(exportDestinationS3)
@@ -75,6 +104,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportDestinationUpdateResponse = apply {
if (validated) {
return@apply
@@ -201,6 +238,10 @@ private constructor(
override fun ObjectCodec.deserialize(node: JsonNode): DataExportDestinationUpdateResponse {
val json = JsonValue.fromJsonNode(node)
+ val destinationType =
+ json.asObject().getOrNull()?.get("destinationType")?.asString()?.getOrNull()
+
+ when (destinationType) {}
val bestMatches =
sequenceOf(
@@ -880,6 +921,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ExportDestinationS3Response = apply {
if (validated) {
return@apply
@@ -1040,6 +1090,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PartitionOrder = apply {
if (validated) {
return@apply
@@ -1860,6 +1920,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ExportDestinationGoogleCloudStorageResponse = apply {
if (validated) {
return@apply
@@ -2026,6 +2095,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PartitionOrder = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobGetDownloadUrlResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobGetDownloadUrlResponse.kt
index 5b872900..75fb4994 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobGetDownloadUrlResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobGetDownloadUrlResponse.kt
@@ -163,6 +163,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportJobGetDownloadUrlResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobListPageResponse.kt
index abd359c1..44af4063 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobListPageResponse.kt
@@ -165,6 +165,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportJobListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobListParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobListParams.kt
index 7ed906fd..fd4875a2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobListParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobListParams.kt
@@ -405,6 +405,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobResponse.kt
index 538c5b66..59af0eee 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportJobResponse.kt
@@ -342,6 +342,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportJobResponse = apply {
if (validated) {
return@apply
@@ -468,6 +476,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): SourceType = apply {
if (validated) {
return@apply
@@ -604,6 +621,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleCreateParams.kt
index 1a426aee..c799791c 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleCreateParams.kt
@@ -300,6 +300,35 @@ private constructor(
fun _json(): Optional = Optional.ofNullable(_json)
+ /**
+ * Maps this instance's current variant to a value of type [T] using the given [visitor].
+ *
+ * Note that this method is _not_ forwards compatible with new variants from the API, unless
+ * [visitor] overrides [Visitor.unknown]. To handle variants not known to this version of
+ * the SDK gracefully, consider overriding [Visitor.unknown]:
+ * ```java
+ * import com.m3ter.core.JsonValue;
+ * import java.util.Optional;
+ *
+ * Optional result = body.accept(new Body.Visitor>() {
+ * @Override
+ * public Optional visitOperationalDataExportScheduleRequest(OperationalDataExportScheduleRequest operationalDataExportScheduleRequest) {
+ * return Optional.of(operationalDataExportScheduleRequest.toString());
+ * }
+ *
+ * // ...
+ *
+ * @Override
+ * public Optional unknown(JsonValue json) {
+ * // Or inspect the `json`.
+ * return Optional.empty();
+ * }
+ * });
+ * ```
+ *
+ * @throws M3terInvalidDataException if [Visitor.unknown] is not overridden in [visitor] and
+ * the current variant is unknown.
+ */
fun accept(visitor: Visitor): T =
when {
operationalDataExportScheduleRequest != null ->
@@ -313,6 +342,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleCreateResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleCreateResponse.kt
index 6a719943..dc1fa9fe 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleCreateResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleCreateResponse.kt
@@ -51,6 +51,35 @@ private constructor(
fun _json(): Optional = Optional.ofNullable(_json)
+ /**
+ * Maps this instance's current variant to a value of type [T] using the given [visitor].
+ *
+ * Note that this method is _not_ forwards compatible with new variants from the API, unless
+ * [visitor] overrides [Visitor.unknown]. To handle variants not known to this version of the
+ * SDK gracefully, consider overriding [Visitor.unknown]:
+ * ```java
+ * import com.m3ter.core.JsonValue;
+ * import java.util.Optional;
+ *
+ * Optional result = dataExportScheduleCreateResponse.accept(new DataExportScheduleCreateResponse.Visitor>() {
+ * @Override
+ * public Optional visitOperationalDataExportSchedule(OperationalDataExportScheduleResponse operationalDataExportSchedule) {
+ * return Optional.of(operationalDataExportSchedule.toString());
+ * }
+ *
+ * // ...
+ *
+ * @Override
+ * public Optional unknown(JsonValue json) {
+ * // Or inspect the `json`.
+ * return Optional.empty();
+ * }
+ * });
+ * ```
+ *
+ * @throws M3terInvalidDataException if [Visitor.unknown] is not overridden in [visitor] and the
+ * current variant is unknown.
+ */
fun accept(visitor: Visitor): T =
when {
operationalDataExportSchedule != null ->
@@ -62,6 +91,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportScheduleCreateResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleDeleteResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleDeleteResponse.kt
index f751d76b..feab7eb4 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleDeleteResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleDeleteResponse.kt
@@ -51,6 +51,35 @@ private constructor(
fun _json(): Optional = Optional.ofNullable(_json)
+ /**
+ * Maps this instance's current variant to a value of type [T] using the given [visitor].
+ *
+ * Note that this method is _not_ forwards compatible with new variants from the API, unless
+ * [visitor] overrides [Visitor.unknown]. To handle variants not known to this version of the
+ * SDK gracefully, consider overriding [Visitor.unknown]:
+ * ```java
+ * import com.m3ter.core.JsonValue;
+ * import java.util.Optional;
+ *
+ * Optional result = dataExportScheduleDeleteResponse.accept(new DataExportScheduleDeleteResponse.Visitor>() {
+ * @Override
+ * public Optional visitOperationalDataExportSchedule(OperationalDataExportScheduleResponse operationalDataExportSchedule) {
+ * return Optional.of(operationalDataExportSchedule.toString());
+ * }
+ *
+ * // ...
+ *
+ * @Override
+ * public Optional unknown(JsonValue json) {
+ * // Or inspect the `json`.
+ * return Optional.empty();
+ * }
+ * });
+ * ```
+ *
+ * @throws M3terInvalidDataException if [Visitor.unknown] is not overridden in [visitor] and the
+ * current variant is unknown.
+ */
fun accept(visitor: Visitor): T =
when {
operationalDataExportSchedule != null ->
@@ -62,6 +91,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportScheduleDeleteResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleListPageResponse.kt
index 81f7a3d2..5955cdc0 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleListPageResponse.kt
@@ -169,6 +169,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportScheduleListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleListResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleListResponse.kt
index 3164f27e..2ee5a74a 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleListResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleListResponse.kt
@@ -671,6 +671,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportScheduleListResponse = apply {
if (validated) {
return@apply
@@ -815,6 +823,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ExportFileFormat = apply {
if (validated) {
return@apply
@@ -954,6 +971,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ScheduleType = apply {
if (validated) {
return@apply
@@ -1080,6 +1106,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): SourceType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleRetrieveResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleRetrieveResponse.kt
index 7a73fcc3..37ee6969 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleRetrieveResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleRetrieveResponse.kt
@@ -51,6 +51,35 @@ private constructor(
fun _json(): Optional = Optional.ofNullable(_json)
+ /**
+ * Maps this instance's current variant to a value of type [T] using the given [visitor].
+ *
+ * Note that this method is _not_ forwards compatible with new variants from the API, unless
+ * [visitor] overrides [Visitor.unknown]. To handle variants not known to this version of the
+ * SDK gracefully, consider overriding [Visitor.unknown]:
+ * ```java
+ * import com.m3ter.core.JsonValue;
+ * import java.util.Optional;
+ *
+ * Optional result = dataExportScheduleRetrieveResponse.accept(new DataExportScheduleRetrieveResponse.Visitor>() {
+ * @Override
+ * public Optional visitOperationalDataExportSchedule(OperationalDataExportScheduleResponse operationalDataExportSchedule) {
+ * return Optional.of(operationalDataExportSchedule.toString());
+ * }
+ *
+ * // ...
+ *
+ * @Override
+ * public Optional unknown(JsonValue json) {
+ * // Or inspect the `json`.
+ * return Optional.empty();
+ * }
+ * });
+ * ```
+ *
+ * @throws M3terInvalidDataException if [Visitor.unknown] is not overridden in [visitor] and the
+ * current variant is unknown.
+ */
fun accept(visitor: Visitor): T =
when {
operationalDataExportSchedule != null ->
@@ -62,6 +91,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportScheduleRetrieveResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleUpdateParams.kt
index 18e7a1f8..e2c6e5ac 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleUpdateParams.kt
@@ -304,6 +304,35 @@ private constructor(
fun _json(): Optional = Optional.ofNullable(_json)
+ /**
+ * Maps this instance's current variant to a value of type [T] using the given [visitor].
+ *
+ * Note that this method is _not_ forwards compatible with new variants from the API, unless
+ * [visitor] overrides [Visitor.unknown]. To handle variants not known to this version of
+ * the SDK gracefully, consider overriding [Visitor.unknown]:
+ * ```java
+ * import com.m3ter.core.JsonValue;
+ * import java.util.Optional;
+ *
+ * Optional result = body.accept(new Body.Visitor>() {
+ * @Override
+ * public Optional visitOperationalDataExportScheduleRequest(OperationalDataExportScheduleRequest operationalDataExportScheduleRequest) {
+ * return Optional.of(operationalDataExportScheduleRequest.toString());
+ * }
+ *
+ * // ...
+ *
+ * @Override
+ * public Optional unknown(JsonValue json) {
+ * // Or inspect the `json`.
+ * return Optional.empty();
+ * }
+ * });
+ * ```
+ *
+ * @throws M3terInvalidDataException if [Visitor.unknown] is not overridden in [visitor] and
+ * the current variant is unknown.
+ */
fun accept(visitor: Visitor): T =
when {
operationalDataExportScheduleRequest != null ->
@@ -317,6 +346,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleUpdateResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleUpdateResponse.kt
index a4af201a..09166d3d 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleUpdateResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataExportScheduleUpdateResponse.kt
@@ -51,6 +51,35 @@ private constructor(
fun _json(): Optional = Optional.ofNullable(_json)
+ /**
+ * Maps this instance's current variant to a value of type [T] using the given [visitor].
+ *
+ * Note that this method is _not_ forwards compatible with new variants from the API, unless
+ * [visitor] overrides [Visitor.unknown]. To handle variants not known to this version of the
+ * SDK gracefully, consider overriding [Visitor.unknown]:
+ * ```java
+ * import com.m3ter.core.JsonValue;
+ * import java.util.Optional;
+ *
+ * Optional result = dataExportScheduleUpdateResponse.accept(new DataExportScheduleUpdateResponse.Visitor>() {
+ * @Override
+ * public Optional visitOperationalDataExportSchedule(OperationalDataExportScheduleResponse operationalDataExportSchedule) {
+ * return Optional.of(operationalDataExportSchedule.toString());
+ * }
+ *
+ * // ...
+ *
+ * @Override
+ * public Optional unknown(JsonValue json) {
+ * // Or inspect the `json`.
+ * return Optional.empty();
+ * }
+ * });
+ * ```
+ *
+ * @throws M3terInvalidDataException if [Visitor.unknown] is not overridden in [visitor] and the
+ * current variant is unknown.
+ */
fun accept(visitor: Visitor): T =
when {
operationalDataExportSchedule != null ->
@@ -62,6 +91,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataExportScheduleUpdateResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataField.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataField.kt
index d69c4421..f1e70396 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DataField.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DataField.kt
@@ -243,6 +243,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DataField = apply {
if (validated) {
return@apply
@@ -398,6 +406,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Category = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitLineItemResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitLineItemResponse.kt
index 6c8bf2c3..27d29183 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitLineItemResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitLineItemResponse.kt
@@ -647,6 +647,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DebitLineItemResponse = apply {
if (validated) {
return@apply
@@ -892,6 +900,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonCreateParams.kt
index 10c3e0e6..5ddbf301 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonCreateParams.kt
@@ -603,6 +603,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonListPageResponse.kt
index 96fd6c68..854fb4f3 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonListPageResponse.kt
@@ -164,6 +164,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DebitReasonListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonResponse.kt
index 9c4a4ecc..e9edf39b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonResponse.kt
@@ -425,6 +425,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DebitReasonResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonUpdateParams.kt
index 17e4e4c6..7d8f93d0 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DebitReasonUpdateParams.kt
@@ -611,6 +611,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DerivedField.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DerivedField.kt
index 48a47e66..b23fcb33 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DerivedField.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DerivedField.kt
@@ -291,6 +291,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DerivedField = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/DownloadUrlResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/DownloadUrlResponse.kt
index c5e11e68..0b9ce5d3 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/DownloadUrlResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/DownloadUrlResponse.kt
@@ -114,6 +114,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): DownloadUrlResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/EventGetFieldsResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/EventGetFieldsResponse.kt
index 0f9f45ae..cec45748 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/EventGetFieldsResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/EventGetFieldsResponse.kt
@@ -128,6 +128,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): EventGetFieldsResponse = apply {
if (validated) {
return@apply
@@ -218,6 +226,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Events = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/EventGetTypesResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/EventGetTypesResponse.kt
index 622dd34d..af4d7093 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/EventGetTypesResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/EventGetTypesResponse.kt
@@ -139,6 +139,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): EventGetTypesResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/EventListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/EventListPageResponse.kt
index 1a6f9adb..ef72f5c9 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/EventListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/EventListPageResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): EventListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/EventResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/EventResponse.kt
index 553f3a15..3424d63c 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/EventResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/EventResponse.kt
@@ -276,6 +276,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): EventResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingCreateParams.kt
index 9a77e707..8f7ed7c7 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingCreateParams.kt
@@ -851,6 +851,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingListByExternalEntityPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingListByExternalEntityPageResponse.kt
index 73f04c48..b386607d 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingListByExternalEntityPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingListByExternalEntityPageResponse.kt
@@ -171,6 +171,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ExternalMappingListByExternalEntityPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingListByM3terEntityPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingListByM3terEntityPageResponse.kt
index 91a60dcc..88e30bc2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingListByM3terEntityPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingListByM3terEntityPageResponse.kt
@@ -171,6 +171,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ExternalMappingListByM3terEntityPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingListPageResponse.kt
index 45e7fdf4..387d47f0 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingListPageResponse.kt
@@ -169,6 +169,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ExternalMappingListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingResponse.kt
index 07955898..0390fb2b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingResponse.kt
@@ -560,6 +560,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ExternalMappingResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingUpdateParams.kt
index a7d1f89a..f22514c3 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ExternalMappingUpdateParams.kt
@@ -863,6 +863,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/FileUploadJobResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/FileUploadJobResponse.kt
index 3176e619..61080931 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/FileUploadJobResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/FileUploadJobResponse.kt
@@ -399,6 +399,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): FileUploadJobResponse = apply {
if (validated) {
return@apply
@@ -540,6 +548,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationCreateParams.kt
index 91fc5847..1b20b740 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationCreateParams.kt
@@ -972,6 +972,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1115,6 +1124,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ConfigData = apply {
if (validated) {
return@apply
@@ -1422,6 +1440,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Credentials = apply {
if (validated) {
return@apply
@@ -1507,6 +1534,8 @@ private constructor(
@JvmField val SAGE_INTACCT_CLIENT_SECRET = of("SAGE_INTACCT_CLIENT_SECRET")
+ @JvmField val STATIC_API_KEY = of("STATIC_API_KEY")
+
@JvmStatic fun of(value: String) = Type(JsonField.of(value))
}
@@ -1529,6 +1558,7 @@ private constructor(
SLACK_WEBHOOK,
SAGE_INTACCT_CLIENT_CREDENTIALS,
SAGE_INTACCT_CLIENT_SECRET,
+ STATIC_API_KEY,
}
/**
@@ -1558,6 +1588,7 @@ private constructor(
SLACK_WEBHOOK,
SAGE_INTACCT_CLIENT_CREDENTIALS,
SAGE_INTACCT_CLIENT_SECRET,
+ STATIC_API_KEY,
/** An enum member indicating that [Type] was instantiated with an unknown value. */
_UNKNOWN,
}
@@ -1588,6 +1619,7 @@ private constructor(
SLACK_WEBHOOK -> Value.SLACK_WEBHOOK
SAGE_INTACCT_CLIENT_CREDENTIALS -> Value.SAGE_INTACCT_CLIENT_CREDENTIALS
SAGE_INTACCT_CLIENT_SECRET -> Value.SAGE_INTACCT_CLIENT_SECRET
+ STATIC_API_KEY -> Value.STATIC_API_KEY
else -> Value._UNKNOWN
}
@@ -1619,6 +1651,7 @@ private constructor(
SLACK_WEBHOOK -> Known.SLACK_WEBHOOK
SAGE_INTACCT_CLIENT_CREDENTIALS -> Known.SAGE_INTACCT_CLIENT_CREDENTIALS
SAGE_INTACCT_CLIENT_SECRET -> Known.SAGE_INTACCT_CLIENT_SECRET
+ STATIC_API_KEY -> Known.STATIC_API_KEY
else -> throw M3terInvalidDataException("Unknown Type: $value")
}
@@ -1638,6 +1671,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Type = apply {
if (validated) {
return@apply
@@ -1835,6 +1878,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Destination = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationCreateResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationCreateResponse.kt
index 36ae4e2d..d1614019 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationCreateResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationCreateResponse.kt
@@ -20,6 +20,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
+/** Response containing a IntegrationConfigResponse entity. */
class IntegrationConfigurationCreateResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -714,6 +715,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): IntegrationConfigurationCreateResponse = apply {
if (validated) {
return@apply
@@ -829,6 +838,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ConfigData = apply {
if (validated) {
return@apply
@@ -961,6 +979,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): TriggerType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationDeleteResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationDeleteResponse.kt
index 7e55d6da..a5c04f96 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationDeleteResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationDeleteResponse.kt
@@ -20,6 +20,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
+/** Response containing a IntegrationConfigResponse entity. */
class IntegrationConfigurationDeleteResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -714,6 +715,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): IntegrationConfigurationDeleteResponse = apply {
if (validated) {
return@apply
@@ -829,6 +838,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ConfigData = apply {
if (validated) {
return@apply
@@ -961,6 +979,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): TriggerType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationEnableResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationEnableResponse.kt
index 0a172e07..8064a82b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationEnableResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationEnableResponse.kt
@@ -20,6 +20,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
+/** Response containing a IntegrationConfigResponse entity. */
class IntegrationConfigurationEnableResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -714,6 +715,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): IntegrationConfigurationEnableResponse = apply {
if (validated) {
return@apply
@@ -829,6 +838,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ConfigData = apply {
if (validated) {
return@apply
@@ -961,6 +979,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): TriggerType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationListPageResponse.kt
index c5820914..4cbd349d 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationListPageResponse.kt
@@ -170,6 +170,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): IntegrationConfigurationListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationListResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationListResponse.kt
index 6766a561..0a930b06 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationListResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationListResponse.kt
@@ -713,6 +713,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): IntegrationConfigurationListResponse = apply {
if (validated) {
return@apply
@@ -828,6 +836,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ConfigData = apply {
if (validated) {
return@apply
@@ -960,6 +977,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): TriggerType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationResponse.kt
index 5224f989..d10ba78e 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationResponse.kt
@@ -730,6 +730,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): IntegrationConfigurationResponse = apply {
if (validated) {
return@apply
@@ -928,6 +936,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationUpdateParams.kt
index 3b06bdff..e5833c42 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationUpdateParams.kt
@@ -989,6 +989,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1132,6 +1141,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ConfigData = apply {
if (validated) {
return@apply
@@ -1439,6 +1457,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Credentials = apply {
if (validated) {
return@apply
@@ -1524,6 +1551,8 @@ private constructor(
@JvmField val SAGE_INTACCT_CLIENT_SECRET = of("SAGE_INTACCT_CLIENT_SECRET")
+ @JvmField val STATIC_API_KEY = of("STATIC_API_KEY")
+
@JvmStatic fun of(value: String) = Type(JsonField.of(value))
}
@@ -1546,6 +1575,7 @@ private constructor(
SLACK_WEBHOOK,
SAGE_INTACCT_CLIENT_CREDENTIALS,
SAGE_INTACCT_CLIENT_SECRET,
+ STATIC_API_KEY,
}
/**
@@ -1575,6 +1605,7 @@ private constructor(
SLACK_WEBHOOK,
SAGE_INTACCT_CLIENT_CREDENTIALS,
SAGE_INTACCT_CLIENT_SECRET,
+ STATIC_API_KEY,
/** An enum member indicating that [Type] was instantiated with an unknown value. */
_UNKNOWN,
}
@@ -1605,6 +1636,7 @@ private constructor(
SLACK_WEBHOOK -> Value.SLACK_WEBHOOK
SAGE_INTACCT_CLIENT_CREDENTIALS -> Value.SAGE_INTACCT_CLIENT_CREDENTIALS
SAGE_INTACCT_CLIENT_SECRET -> Value.SAGE_INTACCT_CLIENT_SECRET
+ STATIC_API_KEY -> Value.STATIC_API_KEY
else -> Value._UNKNOWN
}
@@ -1636,6 +1668,7 @@ private constructor(
SLACK_WEBHOOK -> Known.SLACK_WEBHOOK
SAGE_INTACCT_CLIENT_CREDENTIALS -> Known.SAGE_INTACCT_CLIENT_CREDENTIALS
SAGE_INTACCT_CLIENT_SECRET -> Known.SAGE_INTACCT_CLIENT_SECRET
+ STATIC_API_KEY -> Known.STATIC_API_KEY
else -> throw M3terInvalidDataException("Unknown Type: $value")
}
@@ -1655,6 +1688,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Type = apply {
if (validated) {
return@apply
@@ -1852,6 +1895,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Destination = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationUpdateResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationUpdateResponse.kt
index 795ed52f..52a4195f 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationUpdateResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/IntegrationConfigurationUpdateResponse.kt
@@ -20,6 +20,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
+/** Response containing a IntegrationConfigResponse entity. */
class IntegrationConfigurationUpdateResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -714,6 +715,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): IntegrationConfigurationUpdateResponse = apply {
if (validated) {
return@apply
@@ -829,6 +838,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ConfigData = apply {
if (validated) {
return@apply
@@ -961,6 +979,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): TriggerType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/InvitationResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/InvitationResponse.kt
index 44321abe..f0208a09 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/InvitationResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/InvitationResponse.kt
@@ -648,6 +648,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): InvitationResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LineItemResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LineItemResponse.kt
index a5a3fb29..a922b0d8 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LineItemResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LineItemResponse.kt
@@ -1816,6 +1816,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LineItemResponse = apply {
if (validated) {
return@apply
@@ -1990,6 +1998,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Additional = apply {
if (validated) {
return@apply
@@ -2494,6 +2511,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BandUsage = apply {
if (validated) {
return@apply
@@ -2638,6 +2664,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Group = apply {
if (validated) {
return@apply
@@ -2870,6 +2905,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): LineItemType = apply {
if (validated) {
return@apply
@@ -2970,6 +3014,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Segment = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableListPageResponse.kt
index eccef7b3..366bb3bd 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableListPageResponse.kt
@@ -164,6 +164,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataArchieveParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataArchieveParams.kt
index 8a7c05d6..1d65a91c 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataArchieveParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataArchieveParams.kt
@@ -431,6 +431,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -565,6 +574,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ContentType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataArchieveResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataArchieveResponse.kt
index 506665ba..dd29e3f2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataArchieveResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataArchieveResponse.kt
@@ -160,6 +160,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataArchieveResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataCopyParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataCopyParams.kt
index 59b7a8b1..60463a8f 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataCopyParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataCopyParams.kt
@@ -413,6 +413,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataCopyResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataCopyResponse.kt
index 50f29248..ae186707 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataCopyResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataCopyResponse.kt
@@ -155,6 +155,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataCopyResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataDeleteKeyParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataDeleteKeyParams.kt
index bc39251a..e467c0d2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataDeleteKeyParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataDeleteKeyParams.kt
@@ -412,6 +412,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataDeleteKeyResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataDeleteKeyResponse.kt
index 45f493ac..5c11e378 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataDeleteKeyResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataDeleteKeyResponse.kt
@@ -332,6 +332,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataDeleteKeyResponse = apply {
if (validated) {
return@apply
@@ -426,6 +434,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Item = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataDeleteResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataDeleteResponse.kt
index ba126bef..f96f2a04 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataDeleteResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataDeleteResponse.kt
@@ -123,6 +123,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataDeleteResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataGenerateDownloadUrlParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataGenerateDownloadUrlParams.kt
index 36f5e7eb..6f612076 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataGenerateDownloadUrlParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataGenerateDownloadUrlParams.kt
@@ -651,6 +651,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -797,6 +806,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ContentType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataGenerateDownloadUrlResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataGenerateDownloadUrlResponse.kt
index f3f55a5a..0321db87 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataGenerateDownloadUrlResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataGenerateDownloadUrlResponse.kt
@@ -190,6 +190,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataGenerateDownloadUrlResponse = apply {
if (validated) {
return@apply
@@ -279,6 +287,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Headers = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDeleteResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDeleteResponse.kt
index 7693a396..41e35e57 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDeleteResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDeleteResponse.kt
@@ -550,6 +550,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDeleteResponse =
apply {
if (validated) {
@@ -692,6 +700,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
@@ -828,6 +845,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Type = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDownloadParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDownloadParams.kt
index 380084ec..b514a479 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDownloadParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDownloadParams.kt
@@ -442,6 +442,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -576,6 +585,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ContentType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDownloadResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDownloadResponse.kt
index 41e3c301..eeeeb6a3 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDownloadResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDownloadResponse.kt
@@ -130,6 +130,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataLookupTableRevisionDataJobDownloadResponse =
apply {
if (validated) {
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobListPageResponse.kt
index a064e30f..f5404e40 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobListPageResponse.kt
@@ -204,6 +204,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataLookupTableRevisionDataJobListPageResponse =
apply {
if (validated) {
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobListResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobListResponse.kt
index 92fbcc6c..5682aac4 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobListResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobListResponse.kt
@@ -546,6 +546,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataLookupTableRevisionDataJobListResponse =
apply {
if (validated) {
@@ -688,6 +696,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
@@ -824,6 +841,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Type = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobRetrieveResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobRetrieveResponse.kt
index f9789cc7..e0dc2261 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobRetrieveResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataLookupTableRevisionDataJobRetrieveResponse.kt
@@ -551,6 +551,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataLookupTableRevisionDataJobRetrieveResponse =
apply {
if (validated) {
@@ -693,6 +701,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
@@ -829,6 +846,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Type = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataRetrieveKeyResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataRetrieveKeyResponse.kt
index acd7232e..6fc7345e 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataRetrieveKeyResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataRetrieveKeyResponse.kt
@@ -334,6 +334,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataRetrieveKeyResponse = apply {
if (validated) {
return@apply
@@ -428,6 +436,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Item = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataRetrieveResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataRetrieveResponse.kt
index 36c5a6df..fd984699 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataRetrieveResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataRetrieveResponse.kt
@@ -332,6 +332,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataRetrieveResponse = apply {
if (validated) {
return@apply
@@ -426,6 +434,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Item = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateKeyParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateKeyParams.kt
index d42ada57..7c078905 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateKeyParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateKeyParams.kt
@@ -525,6 +525,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -632,6 +641,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Item = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateKeyResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateKeyResponse.kt
index cc5433a8..b9a04929 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateKeyResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateKeyResponse.kt
@@ -332,6 +332,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataUpdateKeyResponse = apply {
if (validated) {
return@apply
@@ -426,6 +434,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Item = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateParams.kt
index 9bc4642e..4a87069a 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateParams.kt
@@ -536,6 +536,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -642,6 +651,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Item = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateResponse.kt
index 449312c8..d8d0ce02 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionDataUpdateResponse.kt
@@ -331,6 +331,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionDataUpdateResponse = apply {
if (validated) {
return@apply
@@ -425,6 +433,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Item = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionListPageResponse.kt
index 763d8b0b..4117df4a 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableLookupTableRevisionListPageResponse.kt
@@ -171,6 +171,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableLookupTableRevisionListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRequest.kt
index 7032d50b..d59c655a 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRequest.kt
@@ -275,6 +275,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableRequest = apply {
if (validated) {
return@apply
@@ -377,6 +385,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableResponse.kt
index f3b338dc..cec7c2f2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableResponse.kt
@@ -490,6 +490,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableResponse = apply {
if (validated) {
return@apply
@@ -604,6 +612,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRevisionRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRevisionRequest.kt
index d86fb2b9..0db4a95e 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRevisionRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRevisionRequest.kt
@@ -366,6 +366,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableRevisionRequest = apply {
if (validated) {
return@apply
@@ -547,6 +555,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Field = apply {
if (validated) {
return@apply
@@ -665,6 +682,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Type = apply {
if (validated) {
return@apply
@@ -792,6 +819,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRevisionResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRevisionResponse.kt
index 980abfa5..6bbdfa7f 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRevisionResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRevisionResponse.kt
@@ -608,6 +608,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableRevisionResponse = apply {
if (validated) {
return@apply
@@ -728,6 +736,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
@@ -914,6 +931,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Field = apply {
if (validated) {
return@apply
@@ -1032,6 +1058,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Type = apply {
if (validated) {
return@apply
@@ -1182,6 +1218,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRevisionStatusRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRevisionStatusRequest.kt
index 5b09fe41..2b749cf2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRevisionStatusRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/LookupTableRevisionStatusRequest.kt
@@ -151,6 +151,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): LookupTableRevisionStatusRequest = apply {
if (validated) {
return@apply
@@ -272,6 +280,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/M3terSignedCredentialsRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/M3terSignedCredentialsRequest.kt
index 562ff5a2..0e85cdc3 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/M3terSignedCredentialsRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/M3terSignedCredentialsRequest.kt
@@ -292,6 +292,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): M3terSignedCredentialsRequest = apply {
if (validated) {
return@apply
@@ -410,6 +418,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Type = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/M3terSignedCredentialsResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/M3terSignedCredentialsResponse.kt
index 498bda39..29bd6dee 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/M3terSignedCredentialsResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/M3terSignedCredentialsResponse.kt
@@ -540,6 +540,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): M3terSignedCredentialsResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/MeasurementRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/MeasurementRequest.kt
index e616d1a0..9b6d770d 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/MeasurementRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/MeasurementRequest.kt
@@ -536,6 +536,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): MeasurementRequest = apply {
if (validated) {
return@apply
@@ -645,6 +653,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Cost = apply {
if (validated) {
return@apply
@@ -745,6 +762,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Income = apply {
if (validated) {
return@apply
@@ -845,6 +871,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Measure = apply {
if (validated) {
return@apply
@@ -945,6 +980,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Metadata = apply {
if (validated) {
return@apply
@@ -1045,6 +1089,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Other = apply {
if (validated) {
return@apply
@@ -1145,6 +1198,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): What = apply {
if (validated) {
return@apply
@@ -1245,6 +1307,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Where = apply {
if (validated) {
return@apply
@@ -1345,6 +1416,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Who = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterCreateParams.kt
index d520eb31..612001d2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterCreateParams.kt
@@ -1040,6 +1040,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1188,6 +1197,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterListPageResponse.kt
index 275fe03e..b4eab228 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterListPageResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): MeterListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterResponse.kt
index 714a45cb..1c582717 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterResponse.kt
@@ -632,6 +632,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): MeterResponse = apply {
if (validated) {
return@apply
@@ -752,6 +760,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterUpdateParams.kt
index 8fe0ef36..4e585b27 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/MeterUpdateParams.kt
@@ -1032,6 +1032,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1180,6 +1189,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationCreateParams.kt
index 1e634887..052bf1b8 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationCreateParams.kt
@@ -992,6 +992,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationListPageResponse.kt
index fa018d29..33e3d56c 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationListPageResponse.kt
@@ -170,6 +170,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): NotificationConfigurationListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationResponse.kt
index 29052184..8e29fa30 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationResponse.kt
@@ -625,6 +625,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): NotificationConfigurationResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationUpdateParams.kt
index c63bea38..9403e3a1 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/NotificationConfigurationUpdateParams.kt
@@ -1004,6 +1004,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ObjectUrlResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ObjectUrlResponse.kt
index 5ff57127..6c34e252 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ObjectUrlResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ObjectUrlResponse.kt
@@ -116,6 +116,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ObjectUrlResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/OperationalDataExportScheduleRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/OperationalDataExportScheduleRequest.kt
index 8f9c95de..fda66069 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/OperationalDataExportScheduleRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/OperationalDataExportScheduleRequest.kt
@@ -246,6 +246,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): OperationalDataExportScheduleRequest = apply {
if (validated) {
return@apply
@@ -475,6 +483,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): OperationalDataType = apply {
if (validated) {
return@apply
@@ -596,6 +613,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): SourceType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/OperationalDataExportScheduleResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/OperationalDataExportScheduleResponse.kt
index 571049e5..beff76e1 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/OperationalDataExportScheduleResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/OperationalDataExportScheduleResponse.kt
@@ -235,6 +235,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): OperationalDataExportScheduleResponse = apply {
if (validated) {
return@apply
@@ -464,6 +472,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): OperationalDataType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/OrganizationConfigRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/OrganizationConfigRequest.kt
index 27cb15c6..6209e8a4 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/OrganizationConfigRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/OrganizationConfigRequest.kt
@@ -1492,6 +1492,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): OrganizationConfigRequest = apply {
if (validated) {
return@apply
@@ -1676,6 +1684,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): AutoGenerateStatementMode = apply {
if (validated) {
return@apply
@@ -1807,6 +1824,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CreditApplicationOrder = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/OrganizationConfigResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/OrganizationConfigResponse.kt
index 8f6ad0c0..717a085b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/OrganizationConfigResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/OrganizationConfigResponse.kt
@@ -1463,6 +1463,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): OrganizationConfigResponse = apply {
if (validated) {
return@apply
@@ -1652,6 +1660,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): AutoApproveBillsGracePeriodUnit = apply {
if (validated) {
return@apply
@@ -1798,6 +1815,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): AutoGenerateStatementMode = apply {
if (validated) {
return@apply
@@ -1929,6 +1955,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CreditApplicationOrder = apply {
if (validated) {
return@apply
@@ -2058,6 +2093,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ExternalInvoiceDate = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToServiceUserResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToServiceUserResponse.kt
index b6f7c0c9..86ababab 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToServiceUserResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToServiceUserResponse.kt
@@ -437,6 +437,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PermissionPolicyAddToServiceUserResponse = apply {
if (validated) {
return@apply
@@ -581,6 +589,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PrincipalType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToSupportUserParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToSupportUserParams.kt
index b3068b9d..8b3cc072 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToSupportUserParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToSupportUserParams.kt
@@ -395,6 +395,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToSupportUserResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToSupportUserResponse.kt
index b64cd8d5..eec123bb 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToSupportUserResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToSupportUserResponse.kt
@@ -437,6 +437,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PermissionPolicyAddToSupportUserResponse = apply {
if (validated) {
return@apply
@@ -581,6 +589,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PrincipalType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToUserGroupResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToUserGroupResponse.kt
index 12025620..e88272de 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToUserGroupResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToUserGroupResponse.kt
@@ -437,6 +437,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PermissionPolicyAddToUserGroupResponse = apply {
if (validated) {
return@apply
@@ -581,6 +589,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PrincipalType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToUserResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToUserResponse.kt
index adfffa12..ec4e4a56 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToUserResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyAddToUserResponse.kt
@@ -436,6 +436,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PermissionPolicyAddToUserResponse = apply {
if (validated) {
return@apply
@@ -580,6 +588,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PrincipalType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyCreateParams.kt
index 04cbfa05..94362634 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyCreateParams.kt
@@ -581,6 +581,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyListPageResponse.kt
index 4ca8009a..bec59247 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyListPageResponse.kt
@@ -169,6 +169,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PermissionPolicyListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromServiceUserResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromServiceUserResponse.kt
index 32ee0730..e18482d6 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromServiceUserResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromServiceUserResponse.kt
@@ -438,6 +438,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PermissionPolicyRemoveFromServiceUserResponse = apply {
if (validated) {
return@apply
@@ -582,6 +590,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PrincipalType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromSupportUserResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromSupportUserResponse.kt
index a09a31cd..f62a3cdf 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromSupportUserResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromSupportUserResponse.kt
@@ -438,6 +438,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PermissionPolicyRemoveFromSupportUserResponse = apply {
if (validated) {
return@apply
@@ -582,6 +590,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PrincipalType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromUserGroupResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromUserGroupResponse.kt
index cb4e1985..b4ddce8d 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromUserGroupResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromUserGroupResponse.kt
@@ -437,6 +437,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PermissionPolicyRemoveFromUserGroupResponse = apply {
if (validated) {
return@apply
@@ -581,6 +589,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PrincipalType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromUserResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromUserResponse.kt
index 5f13c6f6..88adb15f 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromUserResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyRemoveFromUserResponse.kt
@@ -437,6 +437,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PermissionPolicyRemoveFromUserResponse = apply {
if (validated) {
return@apply
@@ -581,6 +589,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): PrincipalType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyResponse.kt
index 6460095b..84b333b3 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyResponse.kt
@@ -455,6 +455,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PermissionPolicyResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyUpdateParams.kt
index 7f2e8431..975a3460 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionPolicyUpdateParams.kt
@@ -592,6 +592,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionStatementResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionStatementResponse.kt
index ea8c0eb7..4d67f3c7 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionStatementResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PermissionStatementResponse.kt
@@ -268,6 +268,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PermissionStatementResponse = apply {
if (validated) {
return@apply
@@ -480,6 +488,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Action = apply {
if (validated) {
return@apply
@@ -610,6 +627,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Effect = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanCreateParams.kt
index 3c964ac1..aa80190f 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanCreateParams.kt
@@ -1646,6 +1646,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1826,6 +1835,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupCreateParams.kt
index 54341e64..754e3e7b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupCreateParams.kt
@@ -1410,6 +1410,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1582,6 +1591,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkCreateParams.kt
index c09af699..3998faa8 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkCreateParams.kt
@@ -520,6 +520,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkListPageResponse.kt
index b4b6fd12..2c2a98c7 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkListPageResponse.kt
@@ -165,6 +165,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PlanGroupLinkListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkResponse.kt
index 3bd1ac35..0e1025f6 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkResponse.kt
@@ -391,6 +391,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PlanGroupLinkResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkUpdateParams.kt
index 8d299d3d..51046172 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupLinkUpdateParams.kt
@@ -532,6 +532,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupListPageResponse.kt
index 75702ff2..9ecba42a 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupListPageResponse.kt
@@ -164,6 +164,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PlanGroupListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupResponse.kt
index 78f3bf51..356e8f8d 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupResponse.kt
@@ -870,6 +870,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PlanGroupResponse = apply {
if (validated) {
return@apply
@@ -1002,6 +1010,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupUpdateParams.kt
index 635aca12..0ac16754 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanGroupUpdateParams.kt
@@ -1429,6 +1429,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1601,6 +1610,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanListPageResponse.kt
index d717428a..c04ba3bd 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanListPageResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PlanListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanResponse.kt
index 132e63d3..33de18f6 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanResponse.kt
@@ -1013,6 +1013,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PlanResponse = apply {
if (validated) {
return@apply
@@ -1151,6 +1159,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateCreateParams.kt
index 6ab4ab34..7de7ab5e 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateCreateParams.kt
@@ -1795,6 +1795,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -2032,6 +2041,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillFrequency = apply {
if (validated) {
return@apply
@@ -2140,6 +2158,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateListPageResponse.kt
index f178a9e0..f597a897 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateListPageResponse.kt
@@ -164,6 +164,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PlanTemplateListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateResponse.kt
index 89077408..09257740 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateResponse.kt
@@ -1040,6 +1040,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PlanTemplateResponse = apply {
if (validated) {
return@apply
@@ -1231,6 +1239,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillFrequency = apply {
if (validated) {
return@apply
@@ -1339,6 +1356,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateUpdateParams.kt
index 7d2637b7..7483fb9d 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanTemplateUpdateParams.kt
@@ -1812,6 +1812,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -2049,6 +2058,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): BillFrequency = apply {
if (validated) {
return@apply
@@ -2157,6 +2175,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanUpdateParams.kt
index deff9297..a6496c5a 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PlanUpdateParams.kt
@@ -1664,6 +1664,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1844,6 +1853,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingBand.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingBand.kt
index 5bde1cf4..9fd82a85 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingBand.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingBand.kt
@@ -273,6 +273,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PricingBand = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingCreateParams.kt
index 00d6f37c..00ab7a02 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingCreateParams.kt
@@ -1928,6 +1928,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -2122,6 +2131,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Segment = apply {
if (validated) {
return@apply
@@ -2266,6 +2284,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Type = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingListPageResponse.kt
index ab111d72..5395fe5b 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingListPageResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PricingListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingResponse.kt
index 118df851..80b97544 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingResponse.kt
@@ -1179,6 +1179,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PricingResponse = apply {
if (validated) {
return@apply
@@ -1345,6 +1353,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): AggregationType = apply {
if (validated) {
return@apply
@@ -1447,6 +1464,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Segment = apply {
if (validated) {
return@apply
@@ -1591,6 +1617,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Type = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingUpdateParams.kt
index e599c770..610ae9ac 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PricingUpdateParams.kt
@@ -1940,6 +1940,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -2134,6 +2143,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Segment = apply {
if (validated) {
return@apply
@@ -2278,6 +2296,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Type = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/PrincipalPermissionRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/PrincipalPermissionRequest.kt
index 7013ba5b..dcbc4cdd 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/PrincipalPermissionRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/PrincipalPermissionRequest.kt
@@ -174,6 +174,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): PrincipalPermissionRequest = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductCreateParams.kt
index 0752a77f..3d03a146 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductCreateParams.kt
@@ -648,6 +648,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -774,6 +783,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductListPageResponse.kt
index 6e7c2d5c..89aae4e7 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductListPageResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ProductListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductResponse.kt
index 5cb48acb..dd9ffa88 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductResponse.kt
@@ -453,6 +453,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ProductResponse = apply {
if (validated) {
return@apply
@@ -565,6 +573,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductUpdateParams.kt
index c463154d..ea18517e 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ProductUpdateParams.kt
@@ -664,6 +664,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -790,6 +799,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupAddResourceParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupAddResourceParams.kt
index 9cbd388d..de506d24 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupAddResourceParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupAddResourceParams.kt
@@ -583,6 +583,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -734,6 +743,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): TargetType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupCreateParams.kt
index ce0f156b..e4bd81a2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupCreateParams.kt
@@ -434,6 +434,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListContentsPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListContentsPageResponse.kt
index d7b0c668..b5aeee1a 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListContentsPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListContentsPageResponse.kt
@@ -170,6 +170,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ResourceGroupListContentsPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListContentsResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListContentsResponse.kt
index 5c0a6018..42d1a073 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListContentsResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListContentsResponse.kt
@@ -395,6 +395,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ResourceGroupListContentsResponse = apply {
if (validated) {
return@apply
@@ -523,6 +531,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): TargetType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListPageResponse.kt
index 2ca3f563..d0accf39 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListPageResponse.kt
@@ -165,6 +165,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ResourceGroupListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListPermissionsPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListPermissionsPageResponse.kt
index 63c60fcc..302bbd7d 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListPermissionsPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupListPermissionsPageResponse.kt
@@ -170,6 +170,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ResourceGroupListPermissionsPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupRemoveResourceParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupRemoveResourceParams.kt
index 9af7e67f..b4688f80 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupRemoveResourceParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupRemoveResourceParams.kt
@@ -585,6 +585,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -736,6 +745,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): TargetType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupResponse.kt
index b579ba3d..860821e4 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupResponse.kt
@@ -356,6 +356,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ResourceGroupResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupUpdateParams.kt
index 8551f3ab..c4bb6f95 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ResourceGroupUpdateParams.kt
@@ -445,6 +445,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduleRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduleRequest.kt
index 8c178933..e63e001a 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduleRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduleRequest.kt
@@ -649,6 +649,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ScheduleRequest = apply {
if (validated) {
return@apply
@@ -800,6 +808,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Frequency = apply {
if (validated) {
return@apply
@@ -908,6 +925,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduleResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduleResponse.kt
index ce58ba45..83d95b4a 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduleResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduleResponse.kt
@@ -929,6 +929,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ScheduleResponse = apply {
if (validated) {
return@apply
@@ -1065,6 +1073,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CustomFields = apply {
if (validated) {
return@apply
@@ -1207,6 +1224,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Frequency = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationCreateParams.kt
index cd02971f..c371e1d6 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationCreateParams.kt
@@ -710,6 +710,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationListPageResponse.kt
index b6cd0029..e2c828c2 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationListPageResponse.kt
@@ -170,6 +170,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ScheduledEventConfigurationListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationResponse.kt
index c19b1ea1..e0360735 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationResponse.kt
@@ -476,6 +476,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): ScheduledEventConfigurationResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationUpdateParams.kt
index e38a8c5a..c6404679 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/ScheduledEventConfigurationUpdateParams.kt
@@ -722,6 +722,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/SetString.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/SetString.kt
index 9642eb87..41994517 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/SetString.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/SetString.kt
@@ -109,6 +109,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): SetString = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementDefinitionResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementDefinitionResponse.kt
index 93bd8a90..f07ada42 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementDefinitionResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementDefinitionResponse.kt
@@ -595,6 +595,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): StatementDefinitionResponse = apply {
if (validated) {
return@apply
@@ -760,6 +768,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): AggregationFrequency = apply {
if (validated) {
return@apply
@@ -1051,6 +1068,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Dimension = apply {
if (validated) {
return@apply
@@ -1297,6 +1323,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Measure = apply {
if (validated) {
return@apply
@@ -1478,6 +1513,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Aggregation = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementJobResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementJobResponse.kt
index d1069810..1420c779 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementJobResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementJobResponse.kt
@@ -11,7 +11,9 @@ import com.m3ter.core.ExcludeMissing
import com.m3ter.core.JsonField
import com.m3ter.core.JsonMissing
import com.m3ter.core.JsonValue
+import com.m3ter.core.checkKnown
import com.m3ter.core.checkRequired
+import com.m3ter.core.toImmutable
import com.m3ter.errors.M3terInvalidDataException
import java.time.OffsetDateTime
import java.util.Collections
@@ -28,6 +30,7 @@ private constructor(
private val csvStatementStatus: JsonField,
private val dtCreated: JsonField,
private val dtLastModified: JsonField,
+ private val filters: JsonField,
private val includeCsvFormat: JsonField,
private val jsonStatementStatus: JsonField,
private val lastModifiedBy: JsonField,
@@ -53,6 +56,7 @@ private constructor(
@JsonProperty("dtLastModified")
@ExcludeMissing
dtLastModified: JsonField = JsonMissing.of(),
+ @JsonProperty("filters") @ExcludeMissing filters: JsonField = JsonMissing.of(),
@JsonProperty("includeCsvFormat")
@ExcludeMissing
includeCsvFormat: JsonField = JsonMissing.of(),
@@ -80,6 +84,7 @@ private constructor(
csvStatementStatus,
dtCreated,
dtLastModified,
+ filters,
includeCsvFormat,
jsonStatementStatus,
lastModifiedBy,
@@ -138,6 +143,12 @@ private constructor(
*/
fun dtLastModified(): Optional = dtLastModified.getOptional("dtLastModified")
+ /**
+ * @throws M3terInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun filters(): Optional = filters.getOptional("filters")
+
/**
* A Boolean value indicating whether the generated statement includes a CSV format.
* * TRUE - includes the statement in CSV format.
@@ -259,6 +270,13 @@ private constructor(
@ExcludeMissing
fun _dtLastModified(): JsonField = dtLastModified
+ /**
+ * Returns the raw JSON value of [filters].
+ *
+ * Unlike [filters], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("filters") @ExcludeMissing fun _filters(): JsonField = filters
+
/**
* Returns the raw JSON value of [includeCsvFormat].
*
@@ -366,6 +384,7 @@ private constructor(
private var csvStatementStatus: JsonField = JsonMissing.of()
private var dtCreated: JsonField = JsonMissing.of()
private var dtLastModified: JsonField = JsonMissing.of()
+ private var filters: JsonField = JsonMissing.of()
private var includeCsvFormat: JsonField = JsonMissing.of()
private var jsonStatementStatus: JsonField = JsonMissing.of()
private var lastModifiedBy: JsonField = JsonMissing.of()
@@ -384,6 +403,7 @@ private constructor(
csvStatementStatus = statementJobResponse.csvStatementStatus
dtCreated = statementJobResponse.dtCreated
dtLastModified = statementJobResponse.dtLastModified
+ filters = statementJobResponse.filters
includeCsvFormat = statementJobResponse.includeCsvFormat
jsonStatementStatus = statementJobResponse.jsonStatementStatus
lastModifiedBy = statementJobResponse.lastModifiedBy
@@ -470,6 +490,16 @@ private constructor(
this.dtLastModified = dtLastModified
}
+ fun filters(filters: Filters) = filters(JsonField.of(filters))
+
+ /**
+ * Sets [Builder.filters] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.filters] with a well-typed [Filters] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun filters(filters: JsonField) = apply { this.filters = filters }
+
/**
* A Boolean value indicating whether the generated statement includes a CSV format.
* * TRUE - includes the statement in CSV format.
@@ -636,6 +666,7 @@ private constructor(
csvStatementStatus,
dtCreated,
dtLastModified,
+ filters,
includeCsvFormat,
jsonStatementStatus,
lastModifiedBy,
@@ -650,6 +681,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): StatementJobResponse = apply {
if (validated) {
return@apply
@@ -661,6 +700,7 @@ private constructor(
csvStatementStatus().ifPresent { it.validate() }
dtCreated()
dtLastModified()
+ filters().ifPresent { it.validate() }
includeCsvFormat()
jsonStatementStatus().ifPresent { it.validate() }
lastModifiedBy()
@@ -693,6 +733,7 @@ private constructor(
(csvStatementStatus.asKnown().getOrNull()?.validity() ?: 0) +
(if (dtCreated.asKnown().isPresent) 1 else 0) +
(if (dtLastModified.asKnown().isPresent) 1 else 0) +
+ (filters.asKnown().getOrNull()?.validity() ?: 0) +
(if (includeCsvFormat.asKnown().isPresent) 1 else 0) +
(jsonStatementStatus.asKnown().getOrNull()?.validity() ?: 0) +
(if (lastModifiedBy.asKnown().isPresent) 1 else 0) +
@@ -799,6 +840,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): CsvStatementStatus = apply {
if (validated) {
return@apply
@@ -837,6 +887,178 @@ private constructor(
override fun toString() = value.toString()
}
+ class Filters
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val meterIds: JsonField>,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("meterIds")
+ @ExcludeMissing
+ meterIds: JsonField> = JsonMissing.of()
+ ) : this(meterIds, mutableMapOf())
+
+ /**
+ * Include usage line items whose meterId matches one of these values.
+ *
+ * @throws M3terInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun meterIds(): Optional> = meterIds.getOptional("meterIds")
+
+ /**
+ * Returns the raw JSON value of [meterIds].
+ *
+ * Unlike [meterIds], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("meterIds")
+ @ExcludeMissing
+ fun _meterIds(): JsonField> = meterIds
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /** Returns a mutable builder for constructing an instance of [Filters]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Filters]. */
+ class Builder internal constructor() {
+
+ private var meterIds: JsonField>? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(filters: Filters) = apply {
+ meterIds = filters.meterIds.map { it.toMutableList() }
+ additionalProperties = filters.additionalProperties.toMutableMap()
+ }
+
+ /** Include usage line items whose meterId matches one of these values. */
+ fun meterIds(meterIds: List) = meterIds(JsonField.of(meterIds))
+
+ /**
+ * Sets [Builder.meterIds] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.meterIds] with a well-typed `List` value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun meterIds(meterIds: JsonField>) = apply {
+ this.meterIds = meterIds.map { it.toMutableList() }
+ }
+
+ /**
+ * Adds a single [String] to [meterIds].
+ *
+ * @throws IllegalStateException if the field was previously set to a non-list.
+ */
+ fun addMeterId(meterId: String) = apply {
+ meterIds =
+ (meterIds ?: JsonField.of(mutableListOf())).also {
+ checkKnown("meterIds", it).add(meterId)
+ }
+ }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [Filters].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): Filters =
+ Filters(
+ (meterIds ?: JsonMissing.of()).map { it.toImmutable() },
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): Filters = apply {
+ if (validated) {
+ return@apply
+ }
+
+ meterIds()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: M3terInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = (meterIds.asKnown().getOrNull()?.size ?: 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Filters &&
+ meterIds == other.meterIds &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(meterIds, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Filters{meterIds=$meterIds, additionalProperties=$additionalProperties}"
+ }
+
class JsonStatementStatus
@JsonCreator
private constructor(private val value: JsonField) : Enum {
@@ -934,6 +1156,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): JsonStatementStatus = apply {
if (validated) {
return@apply
@@ -1085,6 +1316,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): StatementJobStatus = apply {
if (validated) {
return@apply
@@ -1135,6 +1375,7 @@ private constructor(
csvStatementStatus == other.csvStatementStatus &&
dtCreated == other.dtCreated &&
dtLastModified == other.dtLastModified &&
+ filters == other.filters &&
includeCsvFormat == other.includeCsvFormat &&
jsonStatementStatus == other.jsonStatementStatus &&
lastModifiedBy == other.lastModifiedBy &&
@@ -1154,6 +1395,7 @@ private constructor(
csvStatementStatus,
dtCreated,
dtLastModified,
+ filters,
includeCsvFormat,
jsonStatementStatus,
lastModifiedBy,
@@ -1169,5 +1411,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "StatementJobResponse{id=$id, billId=$billId, createdBy=$createdBy, csvStatementStatus=$csvStatementStatus, dtCreated=$dtCreated, dtLastModified=$dtLastModified, includeCsvFormat=$includeCsvFormat, jsonStatementStatus=$jsonStatementStatus, lastModifiedBy=$lastModifiedBy, orgId=$orgId, presignedCsvStatementUrl=$presignedCsvStatementUrl, presignedJsonStatementUrl=$presignedJsonStatementUrl, statementJobStatus=$statementJobStatus, version=$version, additionalProperties=$additionalProperties}"
+ "StatementJobResponse{id=$id, billId=$billId, createdBy=$createdBy, csvStatementStatus=$csvStatementStatus, dtCreated=$dtCreated, dtLastModified=$dtLastModified, filters=$filters, includeCsvFormat=$includeCsvFormat, jsonStatementStatus=$jsonStatementStatus, lastModifiedBy=$lastModifiedBy, orgId=$orgId, presignedCsvStatementUrl=$presignedCsvStatementUrl, presignedJsonStatementUrl=$presignedJsonStatementUrl, statementJobStatus=$statementJobStatus, version=$version, additionalProperties=$additionalProperties}"
}
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementDefinitionCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementDefinitionCreateParams.kt
index fd5e162c..32637627 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementDefinitionCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementDefinitionCreateParams.kt
@@ -892,6 +892,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1083,6 +1092,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): AggregationFrequency = apply {
if (validated) {
return@apply
@@ -1374,6 +1392,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Dimension = apply {
if (validated) {
return@apply
@@ -1620,6 +1647,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Measure = apply {
if (validated) {
return@apply
@@ -1801,6 +1837,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Aggregation = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementDefinitionListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementDefinitionListPageResponse.kt
index c7942cbb..2933deee 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementDefinitionListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementDefinitionListPageResponse.kt
@@ -171,6 +171,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): StatementStatementDefinitionListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementDefinitionUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementDefinitionUpdateParams.kt
index de3f2790..07c6981f 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementDefinitionUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementDefinitionUpdateParams.kt
@@ -905,6 +905,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1096,6 +1105,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): AggregationFrequency = apply {
if (validated) {
return@apply
@@ -1387,6 +1405,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Dimension = apply {
if (validated) {
return@apply
@@ -1633,6 +1660,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Measure = apply {
if (validated) {
return@apply
@@ -1814,6 +1850,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Aggregation = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementJobCreateBatchParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementJobCreateBatchParams.kt
index d15bf83e..6602d895 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementJobCreateBatchParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementJobCreateBatchParams.kt
@@ -71,6 +71,12 @@ private constructor(
*/
fun billIds(): List = body.billIds()
+ /**
+ * @throws M3terInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun filters(): Optional = body.filters()
+
/**
* A Boolean value indicating whether the generated statement includes a CSV format.
* * TRUE - includes the statement in CSV format.
@@ -101,6 +107,13 @@ private constructor(
*/
fun _billIds(): JsonField> = body._billIds()
+ /**
+ * Returns the raw JSON value of [filters].
+ *
+ * Unlike [filters], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _filters(): JsonField = body._filters()
+
/**
* Returns the raw JSON value of [includeCsvFormat].
*
@@ -172,6 +185,7 @@ private constructor(
* This is generally only useful if you are already constructing the body separately.
* Otherwise, it's more convenient to use the top-level setters instead:
* - [billIds]
+ * - [filters]
* - [includeCsvFormat]
* - [version]
*/
@@ -196,6 +210,16 @@ private constructor(
*/
fun addBillId(billId: String) = apply { body.addBillId(billId) }
+ fun filters(filters: Filters) = apply { body.filters(filters) }
+
+ /**
+ * Sets [Builder.filters] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.filters] with a well-typed [Filters] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun filters(filters: JsonField) = apply { body.filters(filters) }
+
/**
* A Boolean value indicating whether the generated statement includes a CSV format.
* * TRUE - includes the statement in CSV format.
@@ -388,6 +412,7 @@ private constructor(
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val billIds: JsonField>,
+ private val filters: JsonField,
private val includeCsvFormat: JsonField,
private val version: JsonField,
private val additionalProperties: MutableMap,
@@ -398,11 +423,12 @@ private constructor(
@JsonProperty("billIds")
@ExcludeMissing
billIds: JsonField> = JsonMissing.of(),
+ @JsonProperty("filters") @ExcludeMissing filters: JsonField = JsonMissing.of(),
@JsonProperty("includeCsvFormat")
@ExcludeMissing
includeCsvFormat: JsonField = JsonMissing.of(),
@JsonProperty("version") @ExcludeMissing version: JsonField = JsonMissing.of(),
- ) : this(billIds, includeCsvFormat, version, mutableMapOf())
+ ) : this(billIds, filters, includeCsvFormat, version, mutableMapOf())
/**
* The list of unique identifiers (UUIDs) of the bills associated with the StatementJob.
@@ -412,6 +438,12 @@ private constructor(
*/
fun billIds(): List = billIds.getRequired("billIds")
+ /**
+ * @throws M3terInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun filters(): Optional = filters.getOptional("filters")
+
/**
* A Boolean value indicating whether the generated statement includes a CSV format.
* * TRUE - includes the statement in CSV format.
@@ -442,6 +474,13 @@ private constructor(
*/
@JsonProperty("billIds") @ExcludeMissing fun _billIds(): JsonField> = billIds
+ /**
+ * Returns the raw JSON value of [filters].
+ *
+ * Unlike [filters], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("filters") @ExcludeMissing fun _filters(): JsonField = filters
+
/**
* Returns the raw JSON value of [includeCsvFormat].
*
@@ -488,6 +527,7 @@ private constructor(
class Builder internal constructor() {
private var billIds: JsonField>? = null
+ private var filters: JsonField = JsonMissing.of()
private var includeCsvFormat: JsonField = JsonMissing.of()
private var version: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@@ -495,6 +535,7 @@ private constructor(
@JvmSynthetic
internal fun from(body: Body) = apply {
billIds = body.billIds.map { it.toMutableList() }
+ filters = body.filters
includeCsvFormat = body.includeCsvFormat
version = body.version
additionalProperties = body.additionalProperties.toMutableMap()
@@ -528,6 +569,17 @@ private constructor(
}
}
+ fun filters(filters: Filters) = filters(JsonField.of(filters))
+
+ /**
+ * Sets [Builder.filters] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.filters] with a well-typed [Filters] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun filters(filters: JsonField) = apply { this.filters = filters }
+
/**
* A Boolean value indicating whether the generated statement includes a CSV format.
* * TRUE - includes the statement in CSV format.
@@ -600,6 +652,7 @@ private constructor(
fun build(): Body =
Body(
checkRequired("billIds", billIds).map { it.toImmutable() },
+ filters,
includeCsvFormat,
version,
additionalProperties.toMutableMap(),
@@ -608,12 +661,22 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
}
billIds()
+ filters().ifPresent { it.validate() }
includeCsvFormat()
version()
validated = true
@@ -636,6 +699,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(billIds.asKnown().getOrNull()?.size ?: 0) +
+ (filters.asKnown().getOrNull()?.validity() ?: 0) +
(if (includeCsvFormat.asKnown().isPresent) 1 else 0) +
(if (version.asKnown().isPresent) 1 else 0)
@@ -646,19 +710,192 @@ private constructor(
return other is Body &&
billIds == other.billIds &&
+ filters == other.filters &&
includeCsvFormat == other.includeCsvFormat &&
version == other.version &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(billIds, includeCsvFormat, version, additionalProperties)
+ Objects.hash(billIds, filters, includeCsvFormat, version, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Body{billIds=$billIds, includeCsvFormat=$includeCsvFormat, version=$version, additionalProperties=$additionalProperties}"
+ "Body{billIds=$billIds, filters=$filters, includeCsvFormat=$includeCsvFormat, version=$version, additionalProperties=$additionalProperties}"
+ }
+
+ class Filters
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val meterIds: JsonField>,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("meterIds")
+ @ExcludeMissing
+ meterIds: JsonField> = JsonMissing.of()
+ ) : this(meterIds, mutableMapOf())
+
+ /**
+ * Include usage line items whose meterId matches one of these values.
+ *
+ * @throws M3terInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun meterIds(): Optional> = meterIds.getOptional("meterIds")
+
+ /**
+ * Returns the raw JSON value of [meterIds].
+ *
+ * Unlike [meterIds], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("meterIds")
+ @ExcludeMissing
+ fun _meterIds(): JsonField> = meterIds
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /** Returns a mutable builder for constructing an instance of [Filters]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Filters]. */
+ class Builder internal constructor() {
+
+ private var meterIds: JsonField>? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(filters: Filters) = apply {
+ meterIds = filters.meterIds.map { it.toMutableList() }
+ additionalProperties = filters.additionalProperties.toMutableMap()
+ }
+
+ /** Include usage line items whose meterId matches one of these values. */
+ fun meterIds(meterIds: List) = meterIds(JsonField.of(meterIds))
+
+ /**
+ * Sets [Builder.meterIds] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.meterIds] with a well-typed `List` value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun meterIds(meterIds: JsonField>) = apply {
+ this.meterIds = meterIds.map { it.toMutableList() }
+ }
+
+ /**
+ * Adds a single [String] to [meterIds].
+ *
+ * @throws IllegalStateException if the field was previously set to a non-list.
+ */
+ fun addMeterId(meterId: String) = apply {
+ meterIds =
+ (meterIds ?: JsonField.of(mutableListOf())).also {
+ checkKnown("meterIds", it).add(meterId)
+ }
+ }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [Filters].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): Filters =
+ Filters(
+ (meterIds ?: JsonMissing.of()).map { it.toImmutable() },
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): Filters = apply {
+ if (validated) {
+ return@apply
+ }
+
+ meterIds()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: M3terInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = (meterIds.asKnown().getOrNull()?.size ?: 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Filters &&
+ meterIds == other.meterIds &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(meterIds, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Filters{meterIds=$meterIds, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementJobCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementJobCreateParams.kt
index e2f583f7..c75bcb3e 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementJobCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementJobCreateParams.kt
@@ -11,9 +11,11 @@ import com.m3ter.core.JsonField
import com.m3ter.core.JsonMissing
import com.m3ter.core.JsonValue
import com.m3ter.core.Params
+import com.m3ter.core.checkKnown
import com.m3ter.core.checkRequired
import com.m3ter.core.http.Headers
import com.m3ter.core.http.QueryParams
+import com.m3ter.core.toImmutable
import com.m3ter.errors.M3terInvalidDataException
import java.util.Collections
import java.util.Objects
@@ -69,6 +71,12 @@ private constructor(
*/
fun billId(): String = body.billId()
+ /**
+ * @throws M3terInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun filters(): Optional = body.filters()
+
/**
* A Boolean value indicating whether the generated statement includes a CSV format.
* * TRUE - includes the statement in CSV format.
@@ -99,6 +107,13 @@ private constructor(
*/
fun _billId(): JsonField = body._billId()
+ /**
+ * Returns the raw JSON value of [filters].
+ *
+ * Unlike [filters], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _filters(): JsonField = body._filters()
+
/**
* Returns the raw JSON value of [includeCsvFormat].
*
@@ -169,6 +184,7 @@ private constructor(
* This is generally only useful if you are already constructing the body separately.
* Otherwise, it's more convenient to use the top-level setters instead:
* - [billId]
+ * - [filters]
* - [includeCsvFormat]
* - [version]
*/
@@ -185,6 +201,16 @@ private constructor(
*/
fun billId(billId: JsonField) = apply { body.billId(billId) }
+ fun filters(filters: Filters) = apply { body.filters(filters) }
+
+ /**
+ * Sets [Builder.filters] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.filters] with a well-typed [Filters] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun filters(filters: JsonField) = apply { body.filters(filters) }
+
/**
* A Boolean value indicating whether the generated statement includes a CSV format.
* * TRUE - includes the statement in CSV format.
@@ -377,6 +403,7 @@ private constructor(
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val billId: JsonField,
+ private val filters: JsonField,
private val includeCsvFormat: JsonField,
private val version: JsonField,
private val additionalProperties: MutableMap,
@@ -385,11 +412,12 @@ private constructor(
@JsonCreator
private constructor(
@JsonProperty("billId") @ExcludeMissing billId: JsonField = JsonMissing.of(),
+ @JsonProperty("filters") @ExcludeMissing filters: JsonField = JsonMissing.of(),
@JsonProperty("includeCsvFormat")
@ExcludeMissing
includeCsvFormat: JsonField = JsonMissing.of(),
@JsonProperty("version") @ExcludeMissing version: JsonField = JsonMissing.of(),
- ) : this(billId, includeCsvFormat, version, mutableMapOf())
+ ) : this(billId, filters, includeCsvFormat, version, mutableMapOf())
/**
* The unique identifier (UUID) of the bill associated with the StatementJob.
@@ -399,6 +427,12 @@ private constructor(
*/
fun billId(): String = billId.getRequired("billId")
+ /**
+ * @throws M3terInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun filters(): Optional = filters.getOptional("filters")
+
/**
* A Boolean value indicating whether the generated statement includes a CSV format.
* * TRUE - includes the statement in CSV format.
@@ -429,6 +463,13 @@ private constructor(
*/
@JsonProperty("billId") @ExcludeMissing fun _billId(): JsonField = billId
+ /**
+ * Returns the raw JSON value of [filters].
+ *
+ * Unlike [filters], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("filters") @ExcludeMissing fun _filters(): JsonField = filters
+
/**
* Returns the raw JSON value of [includeCsvFormat].
*
@@ -475,6 +516,7 @@ private constructor(
class Builder internal constructor() {
private var billId: JsonField? = null
+ private var filters: JsonField = JsonMissing.of()
private var includeCsvFormat: JsonField = JsonMissing.of()
private var version: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@@ -482,6 +524,7 @@ private constructor(
@JvmSynthetic
internal fun from(body: Body) = apply {
billId = body.billId
+ filters = body.filters
includeCsvFormat = body.includeCsvFormat
version = body.version
additionalProperties = body.additionalProperties.toMutableMap()
@@ -499,6 +542,17 @@ private constructor(
*/
fun billId(billId: JsonField) = apply { this.billId = billId }
+ fun filters(filters: Filters) = filters(JsonField.of(filters))
+
+ /**
+ * Sets [Builder.filters] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.filters] with a well-typed [Filters] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun filters(filters: JsonField) = apply { this.filters = filters }
+
/**
* A Boolean value indicating whether the generated statement includes a CSV format.
* * TRUE - includes the statement in CSV format.
@@ -571,6 +625,7 @@ private constructor(
fun build(): Body =
Body(
checkRequired("billId", billId),
+ filters,
includeCsvFormat,
version,
additionalProperties.toMutableMap(),
@@ -579,12 +634,22 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
}
billId()
+ filters().ifPresent { it.validate() }
includeCsvFormat()
version()
validated = true
@@ -607,6 +672,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (billId.asKnown().isPresent) 1 else 0) +
+ (filters.asKnown().getOrNull()?.validity() ?: 0) +
(if (includeCsvFormat.asKnown().isPresent) 1 else 0) +
(if (version.asKnown().isPresent) 1 else 0)
@@ -617,19 +683,192 @@ private constructor(
return other is Body &&
billId == other.billId &&
+ filters == other.filters &&
includeCsvFormat == other.includeCsvFormat &&
version == other.version &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(billId, includeCsvFormat, version, additionalProperties)
+ Objects.hash(billId, filters, includeCsvFormat, version, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Body{billId=$billId, filters=$filters, includeCsvFormat=$includeCsvFormat, version=$version, additionalProperties=$additionalProperties}"
+ }
+
+ class Filters
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val meterIds: JsonField>,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("meterIds")
+ @ExcludeMissing
+ meterIds: JsonField> = JsonMissing.of()
+ ) : this(meterIds, mutableMapOf())
+
+ /**
+ * Include usage line items whose meterId matches one of these values.
+ *
+ * @throws M3terInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun meterIds(): Optional> = meterIds.getOptional("meterIds")
+
+ /**
+ * Returns the raw JSON value of [meterIds].
+ *
+ * Unlike [meterIds], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("meterIds")
+ @ExcludeMissing
+ fun _meterIds(): JsonField> = meterIds
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /** Returns a mutable builder for constructing an instance of [Filters]. */
+ @JvmStatic fun builder() = Builder()
}
+ /** A builder for [Filters]. */
+ class Builder internal constructor() {
+
+ private var meterIds: JsonField>? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(filters: Filters) = apply {
+ meterIds = filters.meterIds.map { it.toMutableList() }
+ additionalProperties = filters.additionalProperties.toMutableMap()
+ }
+
+ /** Include usage line items whose meterId matches one of these values. */
+ fun meterIds(meterIds: List) = meterIds(JsonField.of(meterIds))
+
+ /**
+ * Sets [Builder.meterIds] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.meterIds] with a well-typed `List` value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun meterIds(meterIds: JsonField>) = apply {
+ this.meterIds = meterIds.map { it.toMutableList() }
+ }
+
+ /**
+ * Adds a single [String] to [meterIds].
+ *
+ * @throws IllegalStateException if the field was previously set to a non-list.
+ */
+ fun addMeterId(meterId: String) = apply {
+ meterIds =
+ (meterIds ?: JsonField.of(mutableListOf())).also {
+ checkKnown("meterIds", it).add(meterId)
+ }
+ }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [Filters].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): Filters =
+ Filters(
+ (meterIds ?: JsonMissing.of()).map { it.toImmutable() },
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): Filters = apply {
+ if (validated) {
+ return@apply
+ }
+
+ meterIds()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: M3terInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = (meterIds.asKnown().getOrNull()?.size ?: 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Filters &&
+ meterIds == other.meterIds &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(meterIds, additionalProperties) }
+
override fun hashCode(): Int = hashCode
override fun toString() =
- "Body{billId=$billId, includeCsvFormat=$includeCsvFormat, version=$version, additionalProperties=$additionalProperties}"
+ "Filters{meterIds=$meterIds, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementJobListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementJobListPageResponse.kt
index 12ebcfaf..5676f4ff 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementJobListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/StatementStatementJobListPageResponse.kt
@@ -168,6 +168,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): StatementStatementJobListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/SubmitMeasurementsRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/SubmitMeasurementsRequest.kt
index 6e226667..cfc32898 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/SubmitMeasurementsRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/SubmitMeasurementsRequest.kt
@@ -153,6 +153,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): SubmitMeasurementsRequest = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/SubmitMeasurementsResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/SubmitMeasurementsResponse.kt
index b403c598..2f120f16 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/SubmitMeasurementsResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/SubmitMeasurementsResponse.kt
@@ -115,6 +115,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): SubmitMeasurementsResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionResponse.kt
index 8936fce9..2c60a2c9 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionResponse.kt
@@ -679,6 +679,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): TransactionResponse = apply {
if (validated) {
return@apply
@@ -844,6 +852,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): EntityType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeCreateParams.kt
index bda86cf6..a261bd67 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeCreateParams.kt
@@ -602,6 +602,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeListPageResponse.kt
index 1f9b3283..077f71f7 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeListPageResponse.kt
@@ -169,6 +169,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): TransactionTypeListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeResponse.kt
index 2895e621..e6c9a041 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeResponse.kt
@@ -425,6 +425,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): TransactionTypeResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeUpdateParams.kt
index 51a08695..207c6478 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/TransactionTypeUpdateParams.kt
@@ -614,6 +614,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageDataExportScheduleRequest.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageDataExportScheduleRequest.kt
index 0894e830..bc19d8f3 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageDataExportScheduleRequest.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageDataExportScheduleRequest.kt
@@ -540,6 +540,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): UsageDataExportScheduleRequest = apply {
if (validated) {
return@apply
@@ -663,6 +671,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): SourceType = apply {
if (validated) {
return@apply
@@ -902,6 +919,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): TimePeriod = apply {
if (validated) {
return@apply
@@ -1166,6 +1192,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Aggregation = apply {
if (validated) {
return@apply
@@ -1293,6 +1328,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): FieldType = apply {
if (validated) {
return@apply
@@ -1454,6 +1499,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Function = apply {
if (validated) {
return@apply
@@ -1717,6 +1772,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): DimensionFilter = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageDataExportScheduleResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageDataExportScheduleResponse.kt
index 8d98dcb4..7f2481f9 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageDataExportScheduleResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageDataExportScheduleResponse.kt
@@ -531,6 +531,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): UsageDataExportScheduleResponse = apply {
if (validated) {
return@apply
@@ -797,6 +805,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Aggregation = apply {
if (validated) {
return@apply
@@ -924,6 +941,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): FieldType = apply {
if (validated) {
return@apply
@@ -1085,6 +1112,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Function = apply {
if (validated) {
return@apply
@@ -1348,6 +1385,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): DimensionFilter = apply {
if (validated) {
return@apply
@@ -1602,6 +1648,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): TimePeriod = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadGenerateUploadUrlParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadGenerateUploadUrlParams.kt
index c98a8259..33eb2709 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadGenerateUploadUrlParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadGenerateUploadUrlParams.kt
@@ -575,6 +575,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -722,6 +731,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ContentType = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadGenerateUploadUrlResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadGenerateUploadUrlResponse.kt
index 4ebeec69..29a63536 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadGenerateUploadUrlResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadGenerateUploadUrlResponse.kt
@@ -187,6 +187,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): UsageFileUploadGenerateUploadUrlResponse = apply {
if (validated) {
return@apply
@@ -276,6 +284,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Headers = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadJobGetOriginalDownloadUrlResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadJobGetOriginalDownloadUrlResponse.kt
index ac23121e..fad7bd9c 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadJobGetOriginalDownloadUrlResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadJobGetOriginalDownloadUrlResponse.kt
@@ -188,6 +188,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): UsageFileUploadJobGetOriginalDownloadUrlResponse = apply {
if (validated) {
return@apply
@@ -277,6 +285,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Headers = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadJobListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadJobListPageResponse.kt
index dab24be7..4d9091dd 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadJobListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageFileUploadJobListPageResponse.kt
@@ -167,6 +167,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): UsageFileUploadJobListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageQueryParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageQueryParams.kt
index 4c28b72a..5d5ef5d1 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageQueryParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageQueryParams.kt
@@ -1068,6 +1068,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
@@ -1372,6 +1381,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Aggregation = apply {
if (validated) {
return@apply
@@ -1499,6 +1517,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): FieldType = apply {
if (validated) {
return@apply
@@ -1660,6 +1688,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Function = apply {
if (validated) {
return@apply
@@ -1923,6 +1961,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): DimensionFilter = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageQueryResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageQueryResponse.kt
index 1846b523..eeece182 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageQueryResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UsageQueryResponse.kt
@@ -188,6 +188,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): UsageQueryResponse = apply {
if (validated) {
return@apply
@@ -274,6 +282,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Data = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UserInvitationCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UserInvitationCreateParams.kt
index d72eec85..4a0bbfec 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UserInvitationCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UserInvitationCreateParams.kt
@@ -937,6 +937,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UserInvitationListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UserInvitationListPageResponse.kt
index 0ed663b1..a07698ef 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UserInvitationListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UserInvitationListPageResponse.kt
@@ -166,6 +166,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): UserInvitationListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UserListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UserListPageResponse.kt
index bfb3cf28..7019f906 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UserListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UserListPageResponse.kt
@@ -162,6 +162,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): UserListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UserMeResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UserMeResponse.kt
index 872f3858..70af4d2d 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UserMeResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UserMeResponse.kt
@@ -184,6 +184,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): UserMeResponse = apply {
if (validated) {
return@apply
@@ -1222,6 +1230,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Organization = apply {
if (validated) {
return@apply
@@ -1390,6 +1407,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Status = apply {
if (validated) {
return@apply
@@ -1517,6 +1544,16 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing
+ * fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Type = apply {
if (validated) {
return@apply
@@ -1975,6 +2012,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): ServiceUser = apply {
if (validated) {
return@apply
@@ -2696,6 +2742,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): User = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UserResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UserResponse.kt
index c92cd6c1..696cff25 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UserResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UserResponse.kt
@@ -747,6 +747,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): UserResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/UserUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/UserUpdateParams.kt
index f87f93b5..e3398192 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/UserUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/UserUpdateParams.kt
@@ -595,6 +595,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/Webhook.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/Webhook.kt
index b25aa43f..07fb7220 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/Webhook.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/Webhook.kt
@@ -517,6 +517,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): Webhook = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/WebhookCreateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/WebhookCreateParams.kt
index 91ea00e2..d9463eb6 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/WebhookCreateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/WebhookCreateParams.kt
@@ -770,6 +770,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/WebhookListPageResponse.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/WebhookListPageResponse.kt
index a1f02a3a..56915247 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/WebhookListPageResponse.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/WebhookListPageResponse.kt
@@ -160,6 +160,14 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its expected
+ * type.
+ */
fun validate(): WebhookListPageResponse = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/models/WebhookUpdateParams.kt b/sdk-java-core/src/main/kotlin/com/m3ter/models/WebhookUpdateParams.kt
index 74cafca4..5a463f98 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/models/WebhookUpdateParams.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/models/WebhookUpdateParams.kt
@@ -779,6 +779,15 @@ private constructor(
private var validated: Boolean = false
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws M3terInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
fun validate(): Body = apply {
if (validated) {
return@apply
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountPlanServiceAsync.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountPlanServiceAsync.kt
index b8948907..5ef61a67 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountPlanServiceAsync.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountPlanServiceAsync.kt
@@ -15,6 +15,59 @@ import com.m3ter.models.AccountPlanUpdateParams
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
+/**
+ * Endpoints for AccountPlan and AccountPlanGroup related operations such as creation, update, list
+ * and delete.
+ *
+ * **AccountPlans** An Account represents one of your end-customer accounts. To create an
+ * AccountPlan, you attach a Product Plan to an Account. The AccountPlan then determines the charges
+ * incurred at billing by your end customer for consuming the Product the Plan is for:
+ * * **AccountPlan Active/Inactive**. Set start and end dates to define the period the AccountPlan
+ * is active for the Account.
+ * * **AccountPlan per Product**. If an end customer consumes multiple Products, create separate
+ * AccountPlans to charge for each Product.
+ *
+ * **AccountPlan Constraints:**
+ * * Only one AccountPlan per Product can be active at any one time for an Account.
+ * * If you create a Plan as a custom Plan for a specific Account, you can only use it to create an
+ * AccountPlan for that Account.
+ *
+ * **AccountPlanGroups** Plan Groups are used when you want to apply a minimum spend amount at
+ * billing across several of your Products each of which are priced separately - when you create the
+ * Plan Group, you define an overall minimum spend and then add any priced Plans you want to include
+ * in the Group. To create an AccounPlanGroup, you can attach a Plan Group to an Account that
+ * consumes the separate Products which are priced using the included Plans. At billing, the minimum
+ * spend you've defined for the Plan Group is applied:
+ * * **Active AccountPlanGroup**. Set the start and end dates to define the period for which the
+ * Plan Group will be active for the Account.
+ *
+ * **Plan Group Notes:**
+ * * You can only add *one Plan for the same Product* to a Plan Group. See the
+ * [Plan Group](https://www.m3ter.com/docs/api#tag/PlanGroup) in this API Reference for more
+ * details on creating Plan Groups.
+ * * You can create a *custom Plan Group* for an Account, which means the Plan Group can only be
+ * attached to that Account to create an AccountPlanGroup.
+ *
+ * **AcountPlanGroup - Notes and Constraints:**
+ * * **AccountPlanGroup is type of AccountPlan** When you attach a Plan Group to an Account, this
+ * creates an AccountPlanGroup. However, the m3ter data model *does not support a separate
+ * AccountPlanGroup entity*, and an AccountPlanGroup is a type of AccountPlan where a
+ * `planGroupId` is used instead of a `planId` when it's created. See the
+ * [Create AccountPlan](https://www.m3ter.com/docs/api#tag/AccountPlan/operation/PostAccountPlan)
+ * call in this section and
+ * [Attaching Plan Groups to an Account](https://www.m3ter.com/docs/guides/end-customer-accounts/attaching-plan-groups-to-an-account)
+ * in our main User Documentation.
+ * * **Multiple AccountPlan Groups:** You can attach more than one Plan Group to an Account to
+ * create multiple AccountPlanGroups, but the rule that *only one attached Plan per Product can be
+ * active at any one time for an Account* is preserved:
+ * * Multiple attached Plan Groups on an Account can have overlapping dates only if none of the
+ * Plan Groups contain a Plan belonging to the same Product. If you try to attach a Plan Group
+ * to an Account with Plan Groups already attached and:
+ * * The new Plan Group contains a Product Plan that also belongs to a Plan Group already
+ * attached to the Account.
+ * * The dates for these "matched Plan" Plan Groups being active for the Account would overlap.
+ * * Then you'll receive an error and the attachment will be blocked.
+ */
interface AccountPlanServiceAsync {
/**
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountPlanServiceAsyncImpl.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountPlanServiceAsyncImpl.kt
index 4e27c2e4..72ad1953 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountPlanServiceAsyncImpl.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountPlanServiceAsyncImpl.kt
@@ -28,6 +28,59 @@ import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
import kotlin.jvm.optionals.getOrNull
+/**
+ * Endpoints for AccountPlan and AccountPlanGroup related operations such as creation, update, list
+ * and delete.
+ *
+ * **AccountPlans** An Account represents one of your end-customer accounts. To create an
+ * AccountPlan, you attach a Product Plan to an Account. The AccountPlan then determines the charges
+ * incurred at billing by your end customer for consuming the Product the Plan is for:
+ * * **AccountPlan Active/Inactive**. Set start and end dates to define the period the AccountPlan
+ * is active for the Account.
+ * * **AccountPlan per Product**. If an end customer consumes multiple Products, create separate
+ * AccountPlans to charge for each Product.
+ *
+ * **AccountPlan Constraints:**
+ * * Only one AccountPlan per Product can be active at any one time for an Account.
+ * * If you create a Plan as a custom Plan for a specific Account, you can only use it to create an
+ * AccountPlan for that Account.
+ *
+ * **AccountPlanGroups** Plan Groups are used when you want to apply a minimum spend amount at
+ * billing across several of your Products each of which are priced separately - when you create the
+ * Plan Group, you define an overall minimum spend and then add any priced Plans you want to include
+ * in the Group. To create an AccounPlanGroup, you can attach a Plan Group to an Account that
+ * consumes the separate Products which are priced using the included Plans. At billing, the minimum
+ * spend you've defined for the Plan Group is applied:
+ * * **Active AccountPlanGroup**. Set the start and end dates to define the period for which the
+ * Plan Group will be active for the Account.
+ *
+ * **Plan Group Notes:**
+ * * You can only add *one Plan for the same Product* to a Plan Group. See the
+ * [Plan Group](https://www.m3ter.com/docs/api#tag/PlanGroup) in this API Reference for more
+ * details on creating Plan Groups.
+ * * You can create a *custom Plan Group* for an Account, which means the Plan Group can only be
+ * attached to that Account to create an AccountPlanGroup.
+ *
+ * **AcountPlanGroup - Notes and Constraints:**
+ * * **AccountPlanGroup is type of AccountPlan** When you attach a Plan Group to an Account, this
+ * creates an AccountPlanGroup. However, the m3ter data model *does not support a separate
+ * AccountPlanGroup entity*, and an AccountPlanGroup is a type of AccountPlan where a
+ * `planGroupId` is used instead of a `planId` when it's created. See the
+ * [Create AccountPlan](https://www.m3ter.com/docs/api#tag/AccountPlan/operation/PostAccountPlan)
+ * call in this section and
+ * [Attaching Plan Groups to an Account](https://www.m3ter.com/docs/guides/end-customer-accounts/attaching-plan-groups-to-an-account)
+ * in our main User Documentation.
+ * * **Multiple AccountPlan Groups:** You can attach more than one Plan Group to an Account to
+ * create multiple AccountPlanGroups, but the rule that *only one attached Plan per Product can be
+ * active at any one time for an Account* is preserved:
+ * * Multiple attached Plan Groups on an Account can have overlapping dates only if none of the
+ * Plan Groups contain a Plan belonging to the same Product. If you try to attach a Plan Group
+ * to an Account with Plan Groups already attached and:
+ * * The new Plan Group contains a Product Plan that also belongs to a Plan Group already
+ * attached to the Account.
+ * * The dates for these "matched Plan" Plan Groups being active for the Account would overlap.
+ * * Then you'll receive an error and the attachment will be blocked.
+ */
class AccountPlanServiceAsyncImpl internal constructor(private val clientOptions: ClientOptions) :
AccountPlanServiceAsync {
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountServiceAsync.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountServiceAsync.kt
index 414f1858..1c3c9f7f 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountServiceAsync.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountServiceAsync.kt
@@ -21,6 +21,33 @@ import com.m3ter.models.AccountUpdateParams
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
+/**
+ * Endpoints for Account related operations such as creation, update, list and delete. An Account
+ * represents one of your end-customer accounts.
+ *
+ * Accounts do not belong to a Product to allow for cases where an end customer takes more than one
+ * of your Products, and the charges for these Products differ.
+ *
+ * You typically attach a priced Plan or Plan Template to an Account before you can generate bills
+ * for the Account:
+ * - If a customer consumes several of your Products, you can attach a priced Plan or Plan Template
+ * to the Account for charging against each Product.
+ * - If an Account is charged solely on the basis of an agreed Prepayment/Commitment amount but not
+ * all of the Prepayment is prepaid, you can use a customized billing schedule for outstanding
+ * fees without having to attach a Plan to the Account to generate Bills.
+ *
+ * You can create Child Accounts for end customers who hold multiple Accounts with you. You can then
+ * set up billing for the Parent/Child Account usage to have the end-customer billed once for the
+ * Parent Account, instead of having separate bills issued for usage against each of their multiple
+ * Accounts.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally Identifiable
+ * Information (PII) in m3ter is restricted to a few fields on the **Account** entity. Please ensure
+ * that only the ``name``, ``address``, or ``emailAddress`` fields contain any end-customer PII data
+ * on any Accounts you create. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for more
+ * details.
+ */
interface AccountServiceAsync {
/**
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountServiceAsyncImpl.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountServiceAsyncImpl.kt
index ff1cf688..e16cce31 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountServiceAsyncImpl.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AccountServiceAsyncImpl.kt
@@ -35,6 +35,33 @@ import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
import kotlin.jvm.optionals.getOrNull
+/**
+ * Endpoints for Account related operations such as creation, update, list and delete. An Account
+ * represents one of your end-customer accounts.
+ *
+ * Accounts do not belong to a Product to allow for cases where an end customer takes more than one
+ * of your Products, and the charges for these Products differ.
+ *
+ * You typically attach a priced Plan or Plan Template to an Account before you can generate bills
+ * for the Account:
+ * - If a customer consumes several of your Products, you can attach a priced Plan or Plan Template
+ * to the Account for charging against each Product.
+ * - If an Account is charged solely on the basis of an agreed Prepayment/Commitment amount but not
+ * all of the Prepayment is prepaid, you can use a customized billing schedule for outstanding
+ * fees without having to attach a Plan to the Account to generate Bills.
+ *
+ * You can create Child Accounts for end customers who hold multiple Accounts with you. You can then
+ * set up billing for the Parent/Child Account usage to have the end-customer billed once for the
+ * Parent Account, instead of having separate bills issued for usage against each of their multiple
+ * Accounts.
+ *
+ * **IMPORTANT! - use of PII:** The use of any of your end-customers' Personally Identifiable
+ * Information (PII) in m3ter is restricted to a few fields on the **Account** entity. Please ensure
+ * that only the ``name``, ``address``, or ``emailAddress`` fields contain any end-customer PII data
+ * on any Accounts you create. See the
+ * [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for more
+ * details.
+ */
class AccountServiceAsyncImpl internal constructor(private val clientOptions: ClientOptions) :
AccountServiceAsync {
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AggregationServiceAsync.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AggregationServiceAsync.kt
index e9067b99..7c615e08 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AggregationServiceAsync.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AggregationServiceAsync.kt
@@ -15,6 +15,30 @@ import com.m3ter.models.AggregationUpdateParams
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
+/**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Aggregations.
+ *
+ * An Aggregation links to a Meter and targets a Data Field or Derived Field on the Meter. You
+ * define the method of aggregation used to convert the usage data collected by the targeted Meter
+ * field into a numerical unit of measurement.
+ *
+ * You can then use the unit of measurement an Aggregation yields as a metric for pricing Product
+ * Plans and apply usage-based pricing to your products and services. You might also want to
+ * aggregate raw data measures for other purposes, such as to feed into analytical or business
+ * performance tools.
+ *
+ * **Notes:**
+ * * **Contrast with Compound Aggregations**. Standard or simple Aggregations of this type, which
+ * apply an aggregation method directly to Meter usage data fields, are contrasted with
+ * [Compound Aggregations](https://www.m3ter.com/docs/api#tag/CompoundAggregation). A Compound
+ * Aggregation typically references one or more simple Aggregations and applies a calculation to
+ * them to derive pricing metrics needed to serve more complex usage-based pricing scenarios.
+ * * **Segmented Aggregations**. Segmented Aggregations allow you to segment the usage data
+ * collected by a single Meter. This capability is very useful for implementing some pricing and
+ * billing use cases. See
+ * [Segmented Aggregations](https://www.m3ter.com/docs/guides/usage-data-aggregations/segmented-aggregations)
+ * in our main documentation for more details.
+ */
interface AggregationServiceAsync {
/**
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AggregationServiceAsyncImpl.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AggregationServiceAsyncImpl.kt
index 5d39f8a8..b10ac25c 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AggregationServiceAsyncImpl.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AggregationServiceAsyncImpl.kt
@@ -28,6 +28,30 @@ import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
import kotlin.jvm.optionals.getOrNull
+/**
+ * Endpoints for listing, creating, updating, retrieving, or deleting Aggregations.
+ *
+ * An Aggregation links to a Meter and targets a Data Field or Derived Field on the Meter. You
+ * define the method of aggregation used to convert the usage data collected by the targeted Meter
+ * field into a numerical unit of measurement.
+ *
+ * You can then use the unit of measurement an Aggregation yields as a metric for pricing Product
+ * Plans and apply usage-based pricing to your products and services. You might also want to
+ * aggregate raw data measures for other purposes, such as to feed into analytical or business
+ * performance tools.
+ *
+ * **Notes:**
+ * * **Contrast with Compound Aggregations**. Standard or simple Aggregations of this type, which
+ * apply an aggregation method directly to Meter usage data fields, are contrasted with
+ * [Compound Aggregations](https://www.m3ter.com/docs/api#tag/CompoundAggregation). A Compound
+ * Aggregation typically references one or more simple Aggregations and applies a calculation to
+ * them to derive pricing metrics needed to serve more complex usage-based pricing scenarios.
+ * * **Segmented Aggregations**. Segmented Aggregations allow you to segment the usage data
+ * collected by a single Meter. This capability is very useful for implementing some pricing and
+ * billing use cases. See
+ * [Segmented Aggregations](https://www.m3ter.com/docs/guides/usage-data-aggregations/segmented-aggregations)
+ * in our main documentation for more details.
+ */
class AggregationServiceAsyncImpl internal constructor(private val clientOptions: ClientOptions) :
AggregationServiceAsync {
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AuthenticationServiceAsync.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AuthenticationServiceAsync.kt
index 738d11b3..f180e201 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AuthenticationServiceAsync.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AuthenticationServiceAsync.kt
@@ -10,6 +10,13 @@ import com.m3ter.models.AuthenticationGetBearerTokenResponse
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
+/**
+ * Endpoint for retrieving a JSON Web Token (JWT) bearer token for a ServiceUser using the Client
+ * Credentials Grant flow.
+ *
+ * A ServiceUser represents the automated process you want to grant access to your Organization -
+ * that is, as an API user.
+ */
interface AuthenticationServiceAsync {
/**
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AuthenticationServiceAsyncImpl.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AuthenticationServiceAsyncImpl.kt
index 4d9c71a4..437ec5fb 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AuthenticationServiceAsyncImpl.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/AuthenticationServiceAsyncImpl.kt
@@ -20,6 +20,13 @@ import com.m3ter.models.AuthenticationGetBearerTokenResponse
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
+/**
+ * Endpoint for retrieving a JSON Web Token (JWT) bearer token for a ServiceUser using the Client
+ * Credentials Grant flow.
+ *
+ * A ServiceUser represents the automated process you want to grant access to your Organization -
+ * that is, as an API user.
+ */
class AuthenticationServiceAsyncImpl
internal constructor(private val clientOptions: ClientOptions) : AuthenticationServiceAsync {
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BalanceServiceAsync.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BalanceServiceAsync.kt
index f19d5b81..96ec98c4 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BalanceServiceAsync.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BalanceServiceAsync.kt
@@ -18,6 +18,54 @@ import com.m3ter.services.async.balances.TransactionServiceAsync
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
+/**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative Transaction
+ * amounts for the Balance. To do this, you must first define Transaction Types for your
+ * Organization, and then use one of these Transaction Types when you add a specific Transaction to
+ * a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their Account,
+ * which can then be draw-down against charges due for product or service consumption. You can
+ * include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an initial
+ * free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This acts as an
+ * initial commitment, which allows them to use the service and gain an accurate insight into
+ * their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to subsequent Bills
+ * as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have agreed to
+ * pay for consuming your product or services across a full contract term. A customer might pay the
+ * entire or only part of the agreed amount upfront, but ***the commitment or prepayment amount is
+ * payable regardless of the actual usage by the customer of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used when a
+ * customer wants to add a credit amount to their Account at any time during the service period or
+ * when you as service provider want to add a credit to a customer Account. This Balance credit can
+ * then be drawn-down against for billing the Account for usage, minimum spend, standing charges, or
+ * recurring charges due. Balances therefore serve payment use cases in a more flexible way, for
+ * example to be used for a "Free Credit" sign-up scheme you offer to encourage sales or to enhance
+ * customer satisfaction by adding credit to an Account to compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at Organization
+ * or individual Account level the order in which any Balance/Commitment credit on an Account is
+ * drawn-down - Balance amounts first or Commitment/Prepayment amounts first.
+ */
interface BalanceServiceAsync {
/**
@@ -32,10 +80,74 @@ interface BalanceServiceAsync {
*/
fun withOptions(modifier: Consumer): BalanceServiceAsync
+ /**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative
+ * Transaction amounts for the Balance. To do this, you must first define Transaction Types for
+ * your Organization, and then use one of these Transaction Types when you add a specific
+ * Transaction to a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their
+ * Account, which can then be draw-down against charges due for product or service consumption.
+ * You can include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an
+ * initial free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This acts as
+ * an initial commitment, which allows them to use the service and gain an accurate insight
+ * into their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to subsequent
+ * Bills as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have
+ * agreed to pay for consuming your product or services across a full contract term. A customer
+ * might pay the entire or only part of the agreed amount upfront, but ***the commitment or
+ * prepayment amount is payable regardless of the actual usage by the customer of your service
+ * or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used when a
+ * customer wants to add a credit amount to their Account at any time during the service period
+ * or when you as service provider want to add a credit to a customer Account. This Balance
+ * credit can then be drawn-down against for billing the Account for usage, minimum spend,
+ * standing charges, or recurring charges due. Balances therefore serve payment use cases in a
+ * more flexible way, for example to be used for a "Free Credit" sign-up scheme you offer to
+ * encourage sales or to enhance customer satisfaction by adding credit to an Account to
+ * compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Commitment credit on
+ * an Account is drawn-down - Balance amounts first or Commitment/Prepayment amounts first.
+ */
fun transactions(): TransactionServiceAsync
+ /**
+ * Endpoints for creating/updating/deleting BalanceChargeSchedules.
+ *
+ * **NOTE!** The BalanceChargeSchedule feature is available in Beta release version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition.
+ */
fun chargeSchedules(): ChargeScheduleServiceAsync
+ /**
+ * Endpoints for creating/updating/deleting BalanceTransactionSchedules.
+ *
+ * **NOTE!** The BalanceTransactionSchedule feature is available in Beta release version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition.
+ */
fun transactionSchedules(): TransactionScheduleServiceAsync
/**
@@ -190,10 +302,76 @@ interface BalanceServiceAsync {
modifier: Consumer
): BalanceServiceAsync.WithRawResponse
+ /**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative
+ * Transaction amounts for the Balance. To do this, you must first define Transaction Types
+ * for your Organization, and then use one of these Transaction Types when you add a
+ * specific Transaction to a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their
+ * Account, which can then be draw-down against charges due for product or service
+ * consumption. You can include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an
+ * initial free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This
+ * acts as an initial commitment, which allows them to use the service and gain an
+ * accurate insight into their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to
+ * subsequent Bills as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have
+ * agreed to pay for consuming your product or services across a full contract term. A
+ * customer might pay the entire or only part of the agreed amount upfront, but ***the
+ * commitment or prepayment amount is payable regardless of the actual usage by the customer
+ * of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used
+ * when a customer wants to add a credit amount to their Account at any time during the
+ * service period or when you as service provider want to add a credit to a customer
+ * Account. This Balance credit can then be drawn-down against for billing the Account for
+ * usage, minimum spend, standing charges, or recurring charges due. Balances therefore
+ * serve payment use cases in a more flexible way, for example to be used for a "Free
+ * Credit" sign-up scheme you offer to encourage sales or to enhance customer satisfaction
+ * by adding credit to an Account to compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Commitment credit
+ * on an Account is drawn-down - Balance amounts first or Commitment/Prepayment amounts
+ * first.
+ */
fun transactions(): TransactionServiceAsync.WithRawResponse
+ /**
+ * Endpoints for creating/updating/deleting BalanceChargeSchedules.
+ *
+ * **NOTE!** The BalanceChargeSchedule feature is available in Beta release version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition.
+ */
fun chargeSchedules(): ChargeScheduleServiceAsync.WithRawResponse
+ /**
+ * Endpoints for creating/updating/deleting BalanceTransactionSchedules.
+ *
+ * **NOTE!** The BalanceTransactionSchedule feature is available in Beta release version.
+ * See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition.
+ */
fun transactionSchedules(): TransactionScheduleServiceAsync.WithRawResponse
/**
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BalanceServiceAsyncImpl.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BalanceServiceAsyncImpl.kt
index 7555177a..4659a564 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BalanceServiceAsyncImpl.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BalanceServiceAsyncImpl.kt
@@ -34,6 +34,54 @@ import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
import kotlin.jvm.optionals.getOrNull
+/**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative Transaction
+ * amounts for the Balance. To do this, you must first define Transaction Types for your
+ * Organization, and then use one of these Transaction Types when you add a specific Transaction to
+ * a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their Account,
+ * which can then be draw-down against charges due for product or service consumption. You can
+ * include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an initial
+ * free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This acts as an
+ * initial commitment, which allows them to use the service and gain an accurate insight into
+ * their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to subsequent Bills
+ * as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have agreed to
+ * pay for consuming your product or services across a full contract term. A customer might pay the
+ * entire or only part of the agreed amount upfront, but ***the commitment or prepayment amount is
+ * payable regardless of the actual usage by the customer of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used when a
+ * customer wants to add a credit amount to their Account at any time during the service period or
+ * when you as service provider want to add a credit to a customer Account. This Balance credit can
+ * then be drawn-down against for billing the Account for usage, minimum spend, standing charges, or
+ * recurring charges due. Balances therefore serve payment use cases in a more flexible way, for
+ * example to be used for a "Free Credit" sign-up scheme you offer to encourage sales or to enhance
+ * customer satisfaction by adding credit to an Account to compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at Organization
+ * or individual Account level the order in which any Balance/Commitment credit on an Account is
+ * drawn-down - Balance amounts first or Commitment/Prepayment amounts first.
+ */
class BalanceServiceAsyncImpl internal constructor(private val clientOptions: ClientOptions) :
BalanceServiceAsync {
@@ -58,10 +106,74 @@ class BalanceServiceAsyncImpl internal constructor(private val clientOptions: Cl
override fun withOptions(modifier: Consumer): BalanceServiceAsync =
BalanceServiceAsyncImpl(clientOptions.toBuilder().apply(modifier::accept).build())
+ /**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative
+ * Transaction amounts for the Balance. To do this, you must first define Transaction Types for
+ * your Organization, and then use one of these Transaction Types when you add a specific
+ * Transaction to a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their
+ * Account, which can then be draw-down against charges due for product or service consumption.
+ * You can include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an
+ * initial free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This acts as
+ * an initial commitment, which allows them to use the service and gain an accurate insight
+ * into their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to subsequent
+ * Bills as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have
+ * agreed to pay for consuming your product or services across a full contract term. A customer
+ * might pay the entire or only part of the agreed amount upfront, but ***the commitment or
+ * prepayment amount is payable regardless of the actual usage by the customer of your service
+ * or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used when a
+ * customer wants to add a credit amount to their Account at any time during the service period
+ * or when you as service provider want to add a credit to a customer Account. This Balance
+ * credit can then be drawn-down against for billing the Account for usage, minimum spend,
+ * standing charges, or recurring charges due. Balances therefore serve payment use cases in a
+ * more flexible way, for example to be used for a "Free Credit" sign-up scheme you offer to
+ * encourage sales or to enhance customer satisfaction by adding credit to an Account to
+ * compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Commitment credit on
+ * an Account is drawn-down - Balance amounts first or Commitment/Prepayment amounts first.
+ */
override fun transactions(): TransactionServiceAsync = transactions
+ /**
+ * Endpoints for creating/updating/deleting BalanceChargeSchedules.
+ *
+ * **NOTE!** The BalanceChargeSchedule feature is available in Beta release version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition.
+ */
override fun chargeSchedules(): ChargeScheduleServiceAsync = chargeSchedules
+ /**
+ * Endpoints for creating/updating/deleting BalanceTransactionSchedules.
+ *
+ * **NOTE!** The BalanceTransactionSchedule feature is available in Beta release version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition.
+ */
override fun transactionSchedules(): TransactionScheduleServiceAsync = transactionSchedules
override fun create(
@@ -124,10 +236,76 @@ class BalanceServiceAsyncImpl internal constructor(private val clientOptions: Cl
clientOptions.toBuilder().apply(modifier::accept).build()
)
+ /**
+ * Endpoints for creating/retrieving/updating/deleting Balances on Accounts.
+ *
+ * When you have created a Balance for an Account, you can create a positive or negative
+ * Transaction amounts for the Balance. To do this, you must first define Transaction Types
+ * for your Organization, and then use one of these Transaction Types when you add a
+ * specific Transaction to a Balance - see the
+ * [Create TransactionType](https://www.m3ter.com/docs/api#tag/TransactionType/operation/CreateTransactionType)
+ * call in the Transaction Type section in this API Reference for more details.
+ *
+ * Balances are typically used when a customer prepays an amount to add a credit to their
+ * Account, which can then be draw-down against charges due for product or service
+ * consumption. You can include options to top-up the original Balance.
+ *
+ * Examples of how Balances for end customer Accounts can be used:
+ * * Onboarding Balance/Free Trials. Offering an onboarding incentive to new customers as an
+ * initial free credit Balance on their Account.
+ * * Balance as initial commitment. Add a Balance amount to a new customer Account. This
+ * acts as an initial commitment, which allows them to use the service and gain an
+ * accurate insight into their usage level.
+ * * Managing Customer Satisfaction. Use Balance as credits that will be applied to
+ * subsequent Bills as compensation for acknowledged service delivery issues.
+ * * Facilitating Balance Adjustments:
+ * * Apply negative amounts to immediately write-off outstanding Balances.
+ *
+ * #### What is the difference between Balances and Commitments/Prepayments?
+ *
+ * To manage credit amounts for your end-customer Accounts, you can use Balances or
+ * Commitments/Prepayments. However, these two kinds of credits for Accounts serve different
+ * purposes.
+ *
+ * Commitments - also referred to as Prepayments - are used for amounts end-customers have
+ * agreed to pay for consuming your product or services across a full contract term. A
+ * customer might pay the entire or only part of the agreed amount upfront, but ***the
+ * commitment or prepayment amount is payable regardless of the actual usage by the customer
+ * of your service or product.***
+ *
+ * In contrast, a Balance - often referred to as a Top-Up or Prepaid draw-down - is used
+ * when a customer wants to add a credit amount to their Account at any time during the
+ * service period or when you as service provider want to add a credit to a customer
+ * Account. This Balance credit can then be drawn-down against for billing the Account for
+ * usage, minimum spend, standing charges, or recurring charges due. Balances therefore
+ * serve payment use cases in a more flexible way, for example to be used for a "Free
+ * Credit" sign-up scheme you offer to encourage sales or to enhance customer satisfaction
+ * by adding credit to an Account to compensate for service delivery issues.
+ *
+ * You can use Commitments/Prepayments and Balances together on Account, and define at
+ * Organization or individual Account level the order in which any Balance/Commitment credit
+ * on an Account is drawn-down - Balance amounts first or Commitment/Prepayment amounts
+ * first.
+ */
override fun transactions(): TransactionServiceAsync.WithRawResponse = transactions
+ /**
+ * Endpoints for creating/updating/deleting BalanceChargeSchedules.
+ *
+ * **NOTE!** The BalanceChargeSchedule feature is available in Beta release version. See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition.
+ */
override fun chargeSchedules(): ChargeScheduleServiceAsync.WithRawResponse = chargeSchedules
+ /**
+ * Endpoints for creating/updating/deleting BalanceTransactionSchedules.
+ *
+ * **NOTE!** The BalanceTransactionSchedule feature is available in Beta release version.
+ * See
+ * [Feature Release Stages](https://www.m3ter.com/docs/guides/getting-started/feature-release-stages)
+ * for Beta release definition.
+ */
override fun transactionSchedules(): TransactionScheduleServiceAsync.WithRawResponse =
transactionSchedules
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillConfigServiceAsync.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillConfigServiceAsync.kt
index 42ccec4b..1319ef9f 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillConfigServiceAsync.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillConfigServiceAsync.kt
@@ -11,6 +11,18 @@ import com.m3ter.models.BillConfigUpdateParams
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
+/**
+ * Endpoints for updating and retreiving the Bill Configuration for an Organization. The
+ * Organization represents your company as a direct customer of the m3ter service.
+ *
+ * You can use the **Update BillConfig** endpoint to set a global lock date for **all** Bills - any
+ * Bill with a service period end date on or before the set date will be locked and cannot be
+ * updated.
+ *
+ * **Warning: Ensure all Bills are Approved!** If you try to set a global lock date when there
+ * remains Bills in a *Pending* state whose service period end date is on or before the specified
+ * lock date, then you'll receive an error.
+ */
interface BillConfigServiceAsync {
/**
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillConfigServiceAsyncImpl.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillConfigServiceAsyncImpl.kt
index 0951f479..08cb82d8 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillConfigServiceAsyncImpl.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillConfigServiceAsyncImpl.kt
@@ -21,6 +21,18 @@ import com.m3ter.models.BillConfigUpdateParams
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
+/**
+ * Endpoints for updating and retreiving the Bill Configuration for an Organization. The
+ * Organization represents your company as a direct customer of the m3ter service.
+ *
+ * You can use the **Update BillConfig** endpoint to set a global lock date for **all** Bills - any
+ * Bill with a service period end date on or before the set date will be locked and cannot be
+ * updated.
+ *
+ * **Warning: Ensure all Bills are Approved!** If you try to set a global lock date when there
+ * remains Bills in a *Pending* state whose service period end date is on or before the specified
+ * lock date, then you'll receive an error.
+ */
class BillConfigServiceAsyncImpl internal constructor(private val clientOptions: ClientOptions) :
BillConfigServiceAsync {
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillJobServiceAsync.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillJobServiceAsync.kt
index 47c4eccb..82f692ca 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillJobServiceAsync.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillJobServiceAsync.kt
@@ -15,6 +15,17 @@ import com.m3ter.models.BillJobRetrieveParams
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
+/**
+ * Endpoints for creating, retrieving, listing, and cancelling Bill Jobs.
+ *
+ * Bill Jobs are critical components in billing management, providing asynchronous mechanisms to
+ * calculate and handle bills.
+ *
+ * Bill Jobs give you the flexibiity to run Bills manually for Accounts to suit different billing
+ * management purposes. For example, some historical usage data has come in for an Account and you
+ * want to run a Bill for a specific date on that Account to check that the Bill is showing
+ * correctly for the charges due on the new usage data.
+ */
interface BillJobServiceAsync {
/**
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillJobServiceAsyncImpl.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillJobServiceAsyncImpl.kt
index 55a82c97..7ed583dd 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillJobServiceAsyncImpl.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillJobServiceAsyncImpl.kt
@@ -28,6 +28,17 @@ import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
import kotlin.jvm.optionals.getOrNull
+/**
+ * Endpoints for creating, retrieving, listing, and cancelling Bill Jobs.
+ *
+ * Bill Jobs are critical components in billing management, providing asynchronous mechanisms to
+ * calculate and handle bills.
+ *
+ * Bill Jobs give you the flexibiity to run Bills manually for Accounts to suit different billing
+ * management purposes. For example, some historical usage data has come in for an Account and you
+ * want to run a Bill for a specific date on that Account to check that the Bill is showing
+ * correctly for the charges due on the new usage data.
+ */
class BillJobServiceAsyncImpl internal constructor(private val clientOptions: ClientOptions) :
BillJobServiceAsync {
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillServiceAsync.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillServiceAsync.kt
index d6ad2dd4..58ab7b10 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillServiceAsync.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillServiceAsync.kt
@@ -23,6 +23,15 @@ import com.m3ter.services.async.bills.LineItemServiceAsync
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
+/**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and deleting
+ * Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based pricing
+ * Plans applied for the Products the Account consumes. These endpoints enable interaction with the
+ * billing system, allowing you to obtain billing details and insights into the consumption patterns
+ * and charges of your end-customer Accounts.
+ */
interface BillServiceAsync {
/**
@@ -37,10 +46,34 @@ interface BillServiceAsync {
*/
fun withOptions(modifier: Consumer): BillServiceAsync
+ /**
+ * Endpoints for Credit line item related operations such as creation, update, list and delete.
+ * These are line items on Bills that are specifically related to Credits.
+ *
+ * You use the Credit Reasons created for your Organization when you create Credit line items
+ * for Bills. See [CreditReason](https://www.m3ter.com/docs/api#tag/CreditReason).
+ */
fun creditLineItems(): CreditLineItemServiceAsync
+ /**
+ * Endpoints for Debit line item related operations such as creation, update, list and delete.
+ * These are line items on Bills that are specifically related to Debits.
+ *
+ * You use the Debit Reasons created for your Organization when you create Debit line items for
+ * Bills. See the [DebitReason](https://www.m3ter.com/docs/api#tag/DebitReason) section for
+ * calls you can use to create and manage Debit Reasons for your Organization.
+ */
fun debitLineItems(): DebitLineItemServiceAsync
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights into
+ * the consumption patterns and charges of your end-customer Accounts.
+ */
fun lineItems(): LineItemServiceAsync
/**
@@ -303,10 +336,34 @@ interface BillServiceAsync {
*/
fun withOptions(modifier: Consumer): BillServiceAsync.WithRawResponse
+ /**
+ * Endpoints for Credit line item related operations such as creation, update, list and
+ * delete. These are line items on Bills that are specifically related to Credits.
+ *
+ * You use the Credit Reasons created for your Organization when you create Credit line
+ * items for Bills. See [CreditReason](https://www.m3ter.com/docs/api#tag/CreditReason).
+ */
fun creditLineItems(): CreditLineItemServiceAsync.WithRawResponse
+ /**
+ * Endpoints for Debit line item related operations such as creation, update, list and
+ * delete. These are line items on Bills that are specifically related to Debits.
+ *
+ * You use the Debit Reasons created for your Organization when you create Debit line items
+ * for Bills. See the [DebitReason](https://www.m3ter.com/docs/api#tag/DebitReason) section
+ * for calls you can use to create and manage Debit Reasons for your Organization.
+ */
fun debitLineItems(): DebitLineItemServiceAsync.WithRawResponse
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights
+ * into the consumption patterns and charges of your end-customer Accounts.
+ */
fun lineItems(): LineItemServiceAsync.WithRawResponse
/**
diff --git a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillServiceAsyncImpl.kt b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillServiceAsyncImpl.kt
index 98dbd813..d807a598 100644
--- a/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillServiceAsyncImpl.kt
+++ b/sdk-java-core/src/main/kotlin/com/m3ter/services/async/BillServiceAsyncImpl.kt
@@ -39,6 +39,15 @@ import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
import kotlin.jvm.optionals.getOrNull
+/**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and deleting
+ * Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based pricing
+ * Plans applied for the Products the Account consumes. These endpoints enable interaction with the
+ * billing system, allowing you to obtain billing details and insights into the consumption patterns
+ * and charges of your end-customer Accounts.
+ */
class BillServiceAsyncImpl internal constructor(private val clientOptions: ClientOptions) :
BillServiceAsync {
@@ -61,10 +70,34 @@ class BillServiceAsyncImpl internal constructor(private val clientOptions: Clien
override fun withOptions(modifier: Consumer): BillServiceAsync =
BillServiceAsyncImpl(clientOptions.toBuilder().apply(modifier::accept).build())
+ /**
+ * Endpoints for Credit line item related operations such as creation, update, list and delete.
+ * These are line items on Bills that are specifically related to Credits.
+ *
+ * You use the Credit Reasons created for your Organization when you create Credit line items
+ * for Bills. See [CreditReason](https://www.m3ter.com/docs/api#tag/CreditReason).
+ */
override fun creditLineItems(): CreditLineItemServiceAsync = creditLineItems
+ /**
+ * Endpoints for Debit line item related operations such as creation, update, list and delete.
+ * These are line items on Bills that are specifically related to Debits.
+ *
+ * You use the Debit Reasons created for your Organization when you create Debit line items for
+ * Bills. See the [DebitReason](https://www.m3ter.com/docs/api#tag/DebitReason) section for
+ * calls you can use to create and manage Debit Reasons for your Organization.
+ */
override fun debitLineItems(): DebitLineItemServiceAsync = debitLineItems
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights into
+ * the consumption patterns and charges of your end-customer Accounts.
+ */
override fun lineItems(): LineItemServiceAsync = lineItems
override fun retrieve(
@@ -148,10 +181,34 @@ class BillServiceAsyncImpl internal constructor(private val clientOptions: Clien
clientOptions.toBuilder().apply(modifier::accept).build()
)
+ /**
+ * Endpoints for Credit line item related operations such as creation, update, list and
+ * delete. These are line items on Bills that are specifically related to Credits.
+ *
+ * You use the Credit Reasons created for your Organization when you create Credit line
+ * items for Bills. See [CreditReason](https://www.m3ter.com/docs/api#tag/CreditReason).
+ */
override fun creditLineItems(): CreditLineItemServiceAsync.WithRawResponse = creditLineItems
+ /**
+ * Endpoints for Debit line item related operations such as creation, update, list and
+ * delete. These are line items on Bills that are specifically related to Debits.
+ *
+ * You use the Debit Reasons created for your Organization when you create Debit line items
+ * for Bills. See the [DebitReason](https://www.m3ter.com/docs/api#tag/DebitReason) section
+ * for calls you can use to create and manage Debit Reasons for your Organization.
+ */
override fun debitLineItems(): DebitLineItemServiceAsync.WithRawResponse = debitLineItems
+ /**
+ * Endpoints for billing operations such as creating, updating, listing,downloading, and
+ * deleting Bills.
+ *
+ * Bills are generated for an Account, and are calculated in accordance with the usage-based
+ * pricing Plans applied for the Products the Account consumes. These endpoints enable
+ * interaction with the billing system, allowing you to obtain billing details and insights
+ * into the consumption patterns and charges of your end-customer Accounts.
+ */
override fun lineItems(): LineItemServiceAsync.WithRawResponse = lineItems
private val retrieveHandler: Handler