Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 0.1.0-beta.4 #28

Merged
merged 66 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
541211f
feat(api): OpenAPI spec update via Stainless API (#26)
stainless-app[bot] Sep 30, 2024
e520581
chore(internal): codegen related update (#27)
stainless-app[bot] Sep 30, 2024
53bc7a3
codegen metadata
stainless-bot Oct 1, 2024
f0c2c67
feat(api): OpenAPI spec update via Stainless API (#30)
stainless-app[bot] Oct 4, 2024
48db3fc
chore(internal): codegen related update (#31)
stainless-app[bot] Oct 4, 2024
799e8c3
chore(internal): codegen related update (#32)
stainless-app[bot] Oct 4, 2024
eb465ba
feat(api): OpenAPI spec update via Stainless API (#33)
stainless-app[bot] Oct 7, 2024
10d6376
feat(api): api update (#35)
stainless-app[bot] Oct 16, 2024
3acd4c0
feat(api): api update (#36)
stainless-app[bot] Oct 16, 2024
0b966c4
feat(api): api update (#37)
stainless-app[bot] Oct 24, 2024
0e7bec3
feat(api): api update (#39)
stainless-app[bot] Oct 29, 2024
5ee5774
chore: rebuild project due to codegen change (#40)
stainless-app[bot] Oct 30, 2024
306626e
feat(api): api update (#41)
stainless-app[bot] Oct 31, 2024
bf8db73
chore: rebuild project due to codegen change (#42)
stainless-app[bot] Nov 1, 2024
6e0b1a6
feat(api): api update (#43)
stainless-app[bot] Nov 1, 2024
0b179d8
chore: rebuild project due to codegen change (#44)
stainless-app[bot] Nov 1, 2024
a049cc7
codegen metadata
stainless-bot Nov 4, 2024
4f67b04
feat(api): api update (#45)
stainless-app[bot] Nov 5, 2024
e3396a6
feat(api): api update (#46)
stainless-app[bot] Nov 5, 2024
b188565
feat(api): api update (#47)
stainless-app[bot] Nov 6, 2024
f2ed132
codegen metadata
stainless-bot Nov 8, 2024
bbbbd49
feat(api): api update (#49)
stainless-app[bot] Nov 8, 2024
91315a9
chore: rebuild project due to codegen change (#50)
stainless-app[bot] Nov 12, 2024
2408198
feat(api): api update (#51)
stainless-app[bot] Nov 14, 2024
291a96a
feat(api): api update (#52)
stainless-app[bot] Nov 14, 2024
0d48ba6
chore: rebuild project due to codegen change (#53)
stainless-app[bot] Nov 19, 2024
95e5773
codegen metadata
stainless-bot Nov 20, 2024
9429766
codegen metadata
stainless-bot Nov 20, 2024
ef76201
feat(api): api update (#55)
stainless-app[bot] Nov 22, 2024
2dd63eb
codegen metadata
stainless-bot Nov 26, 2024
192039d
feat(api): api update (#56)
stainless-app[bot] Nov 26, 2024
59454cb
feat(api): api update (#57)
stainless-app[bot] Dec 5, 2024
ca0e98b
feat(api): api update (#58)
stainless-app[bot] Dec 10, 2024
f8d9d01
feat(api): api update (#59)
stainless-app[bot] Dec 14, 2024
68baad4
feat(api): api update (#60)
stainless-app[bot] Dec 17, 2024
e142616
codegen metadata
stainless-app[bot] Dec 18, 2024
3a0ef7c
chore(internal): codegen related update (#61)
stainless-app[bot] Dec 19, 2024
cdad0ef
feat(api): api update (#62)
stainless-app[bot] Dec 20, 2024
5a14051
chore(internal): codegen related update (#63)
stainless-app[bot] Jan 1, 2025
d4be26a
feat(api): api update (#64)
stainless-app[bot] Jan 3, 2025
d848955
codegen metadata
stainless-app[bot] Jan 7, 2025
8efb808
codegen metadata
stainless-app[bot] Jan 8, 2025
5e23c3a
chore(internal): codegen related update (#65)
stainless-app[bot] Jan 8, 2025
401e9f3
feat(api): api update (#66)
stainless-app[bot] Jan 8, 2025
2ed6aac
feat(api): api update (#67)
stainless-app[bot] Jan 9, 2025
75ccb01
codegen metadata
stainless-app[bot] Jan 9, 2025
e8fbde7
feat(api): api update (#68)
stainless-app[bot] Jan 9, 2025
cd05a27
codegen metadata
stainless-app[bot] Jan 10, 2025
23d8111
feat(api): api update (#69)
stainless-app[bot] Jan 10, 2025
7dfe29e
feat(api): api update (#70)
stainless-app[bot] Jan 13, 2025
ee17a91
feat(api): api update (#71)
stainless-app[bot] Jan 14, 2025
ed37fe5
codegen metadata
stainless-app[bot] Jan 15, 2025
265f219
codegen metadata
stainless-app[bot] Jan 15, 2025
c7e064a
codegen metadata
stainless-app[bot] Jan 16, 2025
75967df
codegen metadata
stainless-app[bot] Jan 16, 2025
7dc3d13
codegen metadata
stainless-app[bot] Jan 16, 2025
cb2cd03
feat(api): api update (#72)
stainless-app[bot] Jan 17, 2025
51e1e44
feat(api): api update (#73)
stainless-app[bot] Jan 18, 2025
8818285
fix: fix apijson.Port for embedded structs (#74)
stainless-app[bot] Jan 20, 2025
2acbd14
fix: fix apijson.Port for embedded structs (#75)
stainless-app[bot] Jan 20, 2025
1483246
feat(api): api update (#76)
stainless-app[bot] Jan 21, 2025
fe69f13
codegen metadata
stainless-app[bot] Jan 22, 2025
3029e41
codegen metadata
stainless-app[bot] Jan 22, 2025
69fa2ef
codegen metadata
stainless-app[bot] Jan 22, 2025
1cb9dd6
fix: prevent niche naming conflicts for string enums with different c…
stainless-app[bot] Jan 23, 2025
41de36d
release: 0.1.0-beta.4
stainless-app[bot] Jan 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-beta.3"
".": "0.1.0-beta.4"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 91
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-c4ec65355a30c07306ddff2c4a97411c2eb631a878583ce8bdd876a4fe2a5c96.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-d45fa7bea4d4904432df31863500afbad8207834d9857d1d4b37549ed4621e10.yml
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
brew "go"
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,66 @@
# Changelog

## 0.1.0-beta.4 (2025-01-23)

Full Changelog: [v0.1.0-beta.3...v0.1.0-beta.4](https://github.com/Metronome-Industries/metronome-go/compare/v0.1.0-beta.3...v0.1.0-beta.4)

### Features

* **api:** api update ([#35](https://github.com/Metronome-Industries/metronome-go/issues/35)) ([10d6376](https://github.com/Metronome-Industries/metronome-go/commit/10d637675b897ac77f592646ac7a4d2dada9da70))
* **api:** api update ([#36](https://github.com/Metronome-Industries/metronome-go/issues/36)) ([3acd4c0](https://github.com/Metronome-Industries/metronome-go/commit/3acd4c0a30ae31634e50ef237d7a4b80237f6183))
* **api:** api update ([#37](https://github.com/Metronome-Industries/metronome-go/issues/37)) ([0b966c4](https://github.com/Metronome-Industries/metronome-go/commit/0b966c4dff82ce422020aab5718cbcdfadae2c49))
* **api:** api update ([#39](https://github.com/Metronome-Industries/metronome-go/issues/39)) ([0e7bec3](https://github.com/Metronome-Industries/metronome-go/commit/0e7bec38766346ec8f7e98d4312f4d778d8ca342))
* **api:** api update ([#41](https://github.com/Metronome-Industries/metronome-go/issues/41)) ([306626e](https://github.com/Metronome-Industries/metronome-go/commit/306626e7a4181b09ccec699cd75941823d43eff9))
* **api:** api update ([#43](https://github.com/Metronome-Industries/metronome-go/issues/43)) ([6e0b1a6](https://github.com/Metronome-Industries/metronome-go/commit/6e0b1a6528182d034cc31da1e4d32fec8d9ca48b))
* **api:** api update ([#45](https://github.com/Metronome-Industries/metronome-go/issues/45)) ([4f67b04](https://github.com/Metronome-Industries/metronome-go/commit/4f67b0413755d9f6d8b639652ed81586b01d2b81))
* **api:** api update ([#46](https://github.com/Metronome-Industries/metronome-go/issues/46)) ([e3396a6](https://github.com/Metronome-Industries/metronome-go/commit/e3396a6ec8ad361d6dce18270349fe2c8e7b67d8))
* **api:** api update ([#47](https://github.com/Metronome-Industries/metronome-go/issues/47)) ([b188565](https://github.com/Metronome-Industries/metronome-go/commit/b188565eb98210cfbefc1ea534f007a3e71196a2))
* **api:** api update ([#49](https://github.com/Metronome-Industries/metronome-go/issues/49)) ([bbbbd49](https://github.com/Metronome-Industries/metronome-go/commit/bbbbd49114607c3fa5d7aecf094b131ebae6921e))
* **api:** api update ([#51](https://github.com/Metronome-Industries/metronome-go/issues/51)) ([2408198](https://github.com/Metronome-Industries/metronome-go/commit/24081989f54e4dbf69c7ddd0070b841016608f13))
* **api:** api update ([#52](https://github.com/Metronome-Industries/metronome-go/issues/52)) ([291a96a](https://github.com/Metronome-Industries/metronome-go/commit/291a96a154eab86454437d6bd3f6f748757ba1dd))
* **api:** api update ([#55](https://github.com/Metronome-Industries/metronome-go/issues/55)) ([ef76201](https://github.com/Metronome-Industries/metronome-go/commit/ef76201f363d5737418358348872810f50245039))
* **api:** api update ([#56](https://github.com/Metronome-Industries/metronome-go/issues/56)) ([192039d](https://github.com/Metronome-Industries/metronome-go/commit/192039dae7a966eee237033bc55c8cf3c34504f8))
* **api:** api update ([#57](https://github.com/Metronome-Industries/metronome-go/issues/57)) ([59454cb](https://github.com/Metronome-Industries/metronome-go/commit/59454cb90fd9d6534bda63a08ccae9fcf66065cc))
* **api:** api update ([#58](https://github.com/Metronome-Industries/metronome-go/issues/58)) ([ca0e98b](https://github.com/Metronome-Industries/metronome-go/commit/ca0e98b86365465625ef1dc9751e800f7fc6bd1e))
* **api:** api update ([#59](https://github.com/Metronome-Industries/metronome-go/issues/59)) ([f8d9d01](https://github.com/Metronome-Industries/metronome-go/commit/f8d9d012baa2fafa72da54ac9b437568d43b31fb))
* **api:** api update ([#60](https://github.com/Metronome-Industries/metronome-go/issues/60)) ([68baad4](https://github.com/Metronome-Industries/metronome-go/commit/68baad42fef69291dc2d8a14559e1f4987437c23))
* **api:** api update ([#62](https://github.com/Metronome-Industries/metronome-go/issues/62)) ([cdad0ef](https://github.com/Metronome-Industries/metronome-go/commit/cdad0ef362cccf52e180013a51605455e2a227f4))
* **api:** api update ([#64](https://github.com/Metronome-Industries/metronome-go/issues/64)) ([d4be26a](https://github.com/Metronome-Industries/metronome-go/commit/d4be26a32b3e22d0156bb7cd33fc52e8f9d57694))
* **api:** api update ([#66](https://github.com/Metronome-Industries/metronome-go/issues/66)) ([401e9f3](https://github.com/Metronome-Industries/metronome-go/commit/401e9f365f1e8ea7e5514b06c52dcfbc0df62138))
* **api:** api update ([#67](https://github.com/Metronome-Industries/metronome-go/issues/67)) ([2ed6aac](https://github.com/Metronome-Industries/metronome-go/commit/2ed6aacee3d731e4f5806cca43151b8edd872b0b))
* **api:** api update ([#68](https://github.com/Metronome-Industries/metronome-go/issues/68)) ([e8fbde7](https://github.com/Metronome-Industries/metronome-go/commit/e8fbde79b08afeb854ec6694dbd2fa7a63da37b5))
* **api:** api update ([#69](https://github.com/Metronome-Industries/metronome-go/issues/69)) ([23d8111](https://github.com/Metronome-Industries/metronome-go/commit/23d81115518aa0cb24658c485e307c87a195d88d))
* **api:** api update ([#70](https://github.com/Metronome-Industries/metronome-go/issues/70)) ([7dfe29e](https://github.com/Metronome-Industries/metronome-go/commit/7dfe29e4993aad57d7cb50d662b4d68bb88412c5))
* **api:** api update ([#71](https://github.com/Metronome-Industries/metronome-go/issues/71)) ([ee17a91](https://github.com/Metronome-Industries/metronome-go/commit/ee17a9124828da3b0559bf23a74704db1b8d90b4))
* **api:** api update ([#72](https://github.com/Metronome-Industries/metronome-go/issues/72)) ([cb2cd03](https://github.com/Metronome-Industries/metronome-go/commit/cb2cd034749e27bcf25116c653b1d67571d42ebe))
* **api:** api update ([#73](https://github.com/Metronome-Industries/metronome-go/issues/73)) ([51e1e44](https://github.com/Metronome-Industries/metronome-go/commit/51e1e4496a510e069f09f45e96af696c8b81ba20))
* **api:** api update ([#76](https://github.com/Metronome-Industries/metronome-go/issues/76)) ([1483246](https://github.com/Metronome-Industries/metronome-go/commit/148324689958d60f45884ab17a859149402752af))
* **api:** OpenAPI spec update via Stainless API ([#26](https://github.com/Metronome-Industries/metronome-go/issues/26)) ([541211f](https://github.com/Metronome-Industries/metronome-go/commit/541211f4f43fab71ae4dc87ce001e90a7ca2284e))
* **api:** OpenAPI spec update via Stainless API ([#30](https://github.com/Metronome-Industries/metronome-go/issues/30)) ([f0c2c67](https://github.com/Metronome-Industries/metronome-go/commit/f0c2c6789d1efd54a1b0c1f29c0d89d4c1bbaf28))
* **api:** OpenAPI spec update via Stainless API ([#33](https://github.com/Metronome-Industries/metronome-go/issues/33)) ([eb465ba](https://github.com/Metronome-Industries/metronome-go/commit/eb465ba57ea0a060927d29d3b3c73143e649b66b))


### Bug Fixes

* fix apijson.Port for embedded structs ([#74](https://github.com/Metronome-Industries/metronome-go/issues/74)) ([8818285](https://github.com/Metronome-Industries/metronome-go/commit/88182853b02c29992ed6b9f408d542b48c77730c))
* fix apijson.Port for embedded structs ([#75](https://github.com/Metronome-Industries/metronome-go/issues/75)) ([2acbd14](https://github.com/Metronome-Industries/metronome-go/commit/2acbd14d85cc30333c36dd470b95116acfa7f491))
* prevent niche naming conflicts for string enums with different casing ([#77](https://github.com/Metronome-Industries/metronome-go/issues/77)) ([1cb9dd6](https://github.com/Metronome-Industries/metronome-go/commit/1cb9dd646c7e601a20bc9b10570d63f1fecb3292))


### Chores

* **internal:** codegen related update ([#27](https://github.com/Metronome-Industries/metronome-go/issues/27)) ([e520581](https://github.com/Metronome-Industries/metronome-go/commit/e520581c40181d2b0c0c5d1936b85553bdff8673))
* **internal:** codegen related update ([#31](https://github.com/Metronome-Industries/metronome-go/issues/31)) ([48db3fc](https://github.com/Metronome-Industries/metronome-go/commit/48db3fc98901fc9fa967fffaa2d891175e5ef6cf))
* **internal:** codegen related update ([#32](https://github.com/Metronome-Industries/metronome-go/issues/32)) ([799e8c3](https://github.com/Metronome-Industries/metronome-go/commit/799e8c379cfee51a748fd2b1ff6276088ca56413))
* **internal:** codegen related update ([#61](https://github.com/Metronome-Industries/metronome-go/issues/61)) ([3a0ef7c](https://github.com/Metronome-Industries/metronome-go/commit/3a0ef7c5b9270506b643127088639e1412c6af07))
* **internal:** codegen related update ([#63](https://github.com/Metronome-Industries/metronome-go/issues/63)) ([5a14051](https://github.com/Metronome-Industries/metronome-go/commit/5a14051400fb8688e319abe83d6a1793e76d5328))
* **internal:** codegen related update ([#65](https://github.com/Metronome-Industries/metronome-go/issues/65)) ([5e23c3a](https://github.com/Metronome-Industries/metronome-go/commit/5e23c3a882e2526515a00c0ae87e3927fa405c50))
* rebuild project due to codegen change ([#40](https://github.com/Metronome-Industries/metronome-go/issues/40)) ([5ee5774](https://github.com/Metronome-Industries/metronome-go/commit/5ee5774bad7eeaabbbd3f0242f39ac903d47cda0))
* rebuild project due to codegen change ([#42](https://github.com/Metronome-Industries/metronome-go/issues/42)) ([bf8db73](https://github.com/Metronome-Industries/metronome-go/commit/bf8db7314f7c7eecac4b41d8f46bed17c3f98b76))
* rebuild project due to codegen change ([#44](https://github.com/Metronome-Industries/metronome-go/issues/44)) ([0b179d8](https://github.com/Metronome-Industries/metronome-go/commit/0b179d84d0b401fef4c5389e45a6ab83b936a631))
* rebuild project due to codegen change ([#50](https://github.com/Metronome-Industries/metronome-go/issues/50)) ([91315a9](https://github.com/Metronome-Industries/metronome-go/commit/91315a9a1a0d4a00fc6dded1661fab5f5ffe8362))
* rebuild project due to codegen change ([#53](https://github.com/Metronome-Industries/metronome-go/issues/53)) ([0d48ba6](https://github.com/Metronome-Industries/metronome-go/commit/0d48ba60f0919e73116ff47265893cc08e62b75e))

## 0.1.0-beta.3 (2024-09-20)

Full Changelog: [v0.1.0-beta.2...v0.1.0-beta.3](https://github.com/Metronome-Industries/metronome-go/compare/v0.1.0-beta.2...v0.1.0-beta.3)
Expand Down
33 changes: 20 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
## Setting up the environment

### Install Go 1.18+
To set up the repository, run:

Install go by following relevant directions [here](https://go.dev/doc/install).
```sh
$ ./scripts/bootstrap
$ ./scripts/build
```

This will install all the required dependencies and build the SDK.

You can also [install go 1.18+ manually](https://go.dev/doc/install).

## Modifying/Adding code

Expand All @@ -14,7 +21,7 @@ modify the contents of the `lib/` and `examples/` directories.

All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.

```bash
```go
# add an example to examples/<your-example>/main.go

package main
Expand All @@ -24,36 +31,36 @@ func main() {
}
```

```bash
go run ./examples/<your-example>
```sh
$ go run ./examples/<your-example>
```

## Using the repository from source

To use a local version of this library from source in another project, edit the `go.mod` with a replace
directive. This can be done through the CLI with the following:

```bash
go mod edit -replace github.com/Metronome-Industries/metronome-go=/path/to/metronome-go
```sh
$ go mod edit -replace github.com/Metronome-Industries/metronome-go=/path/to/metronome-go
```

## Running tests

Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```bash
```sh
# you will need npm installed
npx prism mock path/to/your/openapi.yml
$ npx prism mock path/to/your/openapi.yml
```

```bash
go test ./...
```sh
$ ./scripts/test
```

## Formatting

This library uses the standard gofmt code formatter:

```bash
gofmt -s -w .
```sh
$ ./scripts/format
```
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2024 Metronome
Copyright 2025 Metronome

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/Metronome-Industries/metronome-go@v0.1.0-beta.3'
go get -u 'github.com/Metronome-Industries/metronome-go@v0.1.0-beta.4'
```

<!-- x-release-please-end -->
Expand Down Expand Up @@ -113,7 +113,7 @@ if res.Name == "" {
// true if `"name"` is either not present or explicitly null
res.JSON.Name.IsNull()

// true if the `"name"` key was not present in the repsonse JSON at all
// true if the `"name"` key was not present in the response JSON at all
res.JSON.Name.IsMissing()

// When the API returns data that cannot be coerced to the expected type:
Expand Down Expand Up @@ -373,9 +373,13 @@ middleware has been applied.

This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:

1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an [issue](https://www.github.com/Metronome-Industries/metronome-go/issues) with questions, bugs, or suggestions.

## Contributing

See [the contributing documentation](./CONTRIBUTING.md).
10 changes: 7 additions & 3 deletions alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ type AlertNewParams struct {
AlertType param.Field[AlertNewParamsAlertType] `json:"alert_type,required"`
// Name of the alert
Name param.Field[string] `json:"name,required"`
// Threshold value of the alert policy
// Threshold value of the alert policy. Depending upon the alert type, this number
// may represent a financial amount, the days remaining, or a percentage reached.
Threshold param.Field[float64] `json:"threshold,required"`
// For alerts of type `usage_threshold_reached`, specifies which billable metric to
// track the usage for.
Expand Down Expand Up @@ -201,9 +202,12 @@ func (r AlertNewParamsGroupKeyFilter) MarshalJSON() (data []byte, err error) {
}

type AlertArchiveParams struct {
ID shared.IDParam `json:"id,required"`
// The Metronome ID of the alert
ID param.Field[string] `json:"id,required" format:"uuid"`
// If true, resets the uniqueness key on this alert so it can be re-used
ReleaseUniquenessKey param.Field[bool] `json:"release_uniqueness_key"`
}

func (r AlertArchiveParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r.ID)
return apijson.MarshalRoot(r)
}
18 changes: 4 additions & 14 deletions alert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/Metronome-Industries/metronome-go"
"github.com/Metronome-Industries/metronome-go/internal/testutil"
"github.com/Metronome-Industries/metronome-go/option"
"github.com/Metronome-Industries/metronome-go/shared"
)

func TestAlertNewWithOptionalParams(t *testing.T) {
Expand All @@ -37,22 +36,14 @@ func TestAlertNewWithOptionalParams(t *testing.T) {
Entity: metronome.F(metronome.AlertNewParamsCustomFieldFiltersEntityContract),
Key: metronome.F("key"),
Value: metronome.F("value"),
}, {
Entity: metronome.F(metronome.AlertNewParamsCustomFieldFiltersEntityContract),
Key: metronome.F("key"),
Value: metronome.F("value"),
}, {
Entity: metronome.F(metronome.AlertNewParamsCustomFieldFiltersEntityContract),
Key: metronome.F("key"),
Value: metronome.F("value"),
}}),
CustomerID: metronome.F("4db51251-61de-4bfe-b9ce-495e244f3491"),
EvaluateOnCreate: metronome.F(true),
GroupKeyFilter: metronome.F(metronome.AlertNewParamsGroupKeyFilter{
Key: metronome.F("key"),
Value: metronome.F("value"),
}),
InvoiceTypesFilter: metronome.F([]string{"PLAN_ARREARS, SCHEDULED, USAGE, CORRECTION, CREDIT_PURCHASE, or SEAT_PURCHASE", "PLAN_ARREARS, SCHEDULED, USAGE, CORRECTION, CREDIT_PURCHASE, or SEAT_PURCHASE", "PLAN_ARREARS, SCHEDULED, USAGE, CORRECTION, CREDIT_PURCHASE, or SEAT_PURCHASE"}),
InvoiceTypesFilter: metronome.F([]string{"PLAN_ARREARS, SCHEDULED, USAGE, CORRECTION, CREDIT_PURCHASE, or SEAT_PURCHASE"}),
PlanID: metronome.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
UniquenessKey: metronome.F("x"),
})
Expand All @@ -65,7 +56,7 @@ func TestAlertNewWithOptionalParams(t *testing.T) {
}
}

func TestAlertArchive(t *testing.T) {
func TestAlertArchiveWithOptionalParams(t *testing.T) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
Expand All @@ -78,9 +69,8 @@ func TestAlertArchive(t *testing.T) {
option.WithBearerToken("My Bearer Token"),
)
_, err := client.Alerts.Archive(context.TODO(), metronome.AlertArchiveParams{
ID: shared.IDParam{
ID: metronome.F("8deed800-1b7a-495d-a207-6c52bac54dc9"),
},
ID: metronome.F("8deed800-1b7a-495d-a207-6c52bac54dc9"),
ReleaseUniquenessKey: metronome.F(true),
})
if err != nil {
var apierr *metronome.Error
Expand Down
Loading
Loading