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.8.1 #136

Merged
merged 6 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/handle-release-pr-title-edit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ jobs:
update_pr_content:
name: Update pull request content
if: |
(github.event.action == 'edited' && github.event.changes.title.from != github.event.pull_request.title) ||
(github.event.action == 'unlabeled' && github.event.label.name == 'autorelease: custom version') &&
((github.event.action == 'edited' && github.event.changes.title.from != github.event.pull_request.title) ||
(github.event.action == 'unlabeled' && github.event.label.name == 'autorelease: custom version')) &&
startsWith(github.event.pull_request.head.ref, 'release-please--') &&
github.event.pull_request.state == 'open' &&
github.event.sender.login != 'stainless-bot' &&
github.repository == 'lithic-com/lithic-go'
Expand Down
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.8.0"
".": "0.8.1"
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.8.1 (2023-10-03)

Full Changelog: [v0.8.0...v0.8.1](https://github.com/lithic-com/lithic-go/compare/v0.8.0...v0.8.1)

### Bug Fixes

* prevent index out of range bug during auto-pagination ([#139](https://github.com/lithic-com/lithic-go/issues/139)) ([84ad5e7](https://github.com/lithic-com/lithic-go/commit/84ad5e7025ca45e1b76354930f5f723e06f9a610))


### Chores

* **ci:** remove reviewer ([#137](https://github.com/lithic-com/lithic-go/issues/137)) ([3aa48ba](https://github.com/lithic-com/lithic-go/commit/3aa48bad524652597b418d4dcbbad4373ecf712e))
* **tests:** update test examples ([#140](https://github.com/lithic-com/lithic-go/issues/140)) ([805a28b](https://github.com/lithic-com/lithic-go/commit/805a28b29355776ce1e6a404133e1bda5ea0163d))

## 0.8.0 (2023-09-29)

Full Changelog: [v0.7.4...v0.8.0](https://github.com/lithic-com/lithic-go/compare/v0.7.4...v0.8.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/lithic-com/[email protected].0'
go get -u 'github.com/lithic-com/[email protected].1'
```

<!-- x-release-please-end -->
Expand Down
27 changes: 20 additions & 7 deletions account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package lithic_test
import (
"context"
"errors"
"os"
"testing"
"time"

Expand All @@ -14,11 +15,15 @@ import (
)

func TestAccountGet(t *testing.T) {
if !testutil.CheckTestServer(t) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
}
if !testutil.CheckTestServer(t, baseURL) {
return
}
client := lithic.NewClient(
option.WithBaseURL("http://127.0.0.1:4010"),
option.WithBaseURL(baseURL),
option.WithAPIKey("APIKey"),
)
_, err := client.Accounts.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
Expand All @@ -32,19 +37,23 @@ func TestAccountGet(t *testing.T) {
}

func TestAccountUpdateWithOptionalParams(t *testing.T) {
if !testutil.CheckTestServer(t) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
}
if !testutil.CheckTestServer(t, baseURL) {
return
}
t.Skip("Prism returns invalid data")
client := lithic.NewClient(
option.WithBaseURL("http://127.0.0.1:4010"),
option.WithBaseURL(baseURL),
option.WithAPIKey("APIKey"),
)
_, err := client.Accounts.Update(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
lithic.AccountUpdateParams{
DailySpendLimit: lithic.F(int64(0)),
DailySpendLimit: lithic.F(int64(1000)),
LifetimeSpendLimit: lithic.F(int64(0)),
MonthlySpendLimit: lithic.F(int64(0)),
State: lithic.F(lithic.AccountUpdateParamsStateActive),
Expand All @@ -68,11 +77,15 @@ func TestAccountUpdateWithOptionalParams(t *testing.T) {
}

func TestAccountListWithOptionalParams(t *testing.T) {
if !testutil.CheckTestServer(t) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
}
if !testutil.CheckTestServer(t, baseURL) {
return
}
client := lithic.NewClient(
option.WithBaseURL("http://127.0.0.1:4010"),
option.WithBaseURL(baseURL),
option.WithAPIKey("APIKey"),
)
_, err := client.Accounts.List(context.TODO(), lithic.AccountListParams{
Expand Down
59 changes: 44 additions & 15 deletions accountholder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package lithic_test
import (
"context"
"errors"
"os"
"testing"

"github.com/lithic-com/lithic-go"
Expand All @@ -14,11 +15,15 @@ import (
)

func TestAccountHolderNewWithOptionalParams(t *testing.T) {
if !testutil.CheckTestServer(t) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
}
if !testutil.CheckTestServer(t, baseURL) {
return
}
client := lithic.NewClient(
option.WithBaseURL("http://127.0.0.1:4010"),
option.WithBaseURL(baseURL),
option.WithAPIKey("APIKey"),
)
_, err := client.AccountHolders.New(context.TODO(), lithic.AccountHolderNewParamsKYB{
Expand Down Expand Up @@ -158,11 +163,15 @@ func TestAccountHolderNewWithOptionalParams(t *testing.T) {
}

func TestAccountHolderGet(t *testing.T) {
if !testutil.CheckTestServer(t) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
}
if !testutil.CheckTestServer(t, baseURL) {
return
}
client := lithic.NewClient(
option.WithBaseURL("http://127.0.0.1:4010"),
option.WithBaseURL(baseURL),
option.WithAPIKey("APIKey"),
)
_, err := client.AccountHolders.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
Expand All @@ -176,11 +185,15 @@ func TestAccountHolderGet(t *testing.T) {
}

func TestAccountHolderUpdateWithOptionalParams(t *testing.T) {
if !testutil.CheckTestServer(t) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
}
if !testutil.CheckTestServer(t, baseURL) {
return
}
client := lithic.NewClient(
option.WithBaseURL("http://127.0.0.1:4010"),
option.WithBaseURL(baseURL),
option.WithAPIKey("APIKey"),
)
_, err := client.AccountHolders.Update(
Expand All @@ -202,11 +215,15 @@ func TestAccountHolderUpdateWithOptionalParams(t *testing.T) {
}

func TestAccountHolderListDocuments(t *testing.T) {
if !testutil.CheckTestServer(t) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
}
if !testutil.CheckTestServer(t, baseURL) {
return
}
client := lithic.NewClient(
option.WithBaseURL("http://127.0.0.1:4010"),
option.WithBaseURL(baseURL),
option.WithAPIKey("APIKey"),
)
_, err := client.AccountHolders.ListDocuments(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
Expand All @@ -220,11 +237,15 @@ func TestAccountHolderListDocuments(t *testing.T) {
}

func TestAccountHolderResubmit(t *testing.T) {
if !testutil.CheckTestServer(t) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
}
if !testutil.CheckTestServer(t, baseURL) {
return
}
client := lithic.NewClient(
option.WithBaseURL("http://127.0.0.1:4010"),
option.WithBaseURL(baseURL),
option.WithAPIKey("APIKey"),
)
_, err := client.AccountHolders.Resubmit(
Expand Down Expand Up @@ -261,11 +282,15 @@ func TestAccountHolderResubmit(t *testing.T) {
}

func TestAccountHolderGetDocument(t *testing.T) {
if !testutil.CheckTestServer(t) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
}
if !testutil.CheckTestServer(t, baseURL) {
return
}
client := lithic.NewClient(
option.WithBaseURL("http://127.0.0.1:4010"),
option.WithBaseURL(baseURL),
option.WithAPIKey("APIKey"),
)
_, err := client.AccountHolders.GetDocument(
Expand All @@ -283,18 +308,22 @@ func TestAccountHolderGetDocument(t *testing.T) {
}

func TestAccountHolderUploadDocument(t *testing.T) {
if !testutil.CheckTestServer(t) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
}
if !testutil.CheckTestServer(t, baseURL) {
return
}
client := lithic.NewClient(
option.WithBaseURL("http://127.0.0.1:4010"),
option.WithBaseURL(baseURL),
option.WithAPIKey("APIKey"),
)
_, err := client.AccountHolders.UploadDocument(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
lithic.AccountHolderUploadDocumentParams{
DocumentType: lithic.F(lithic.AccountHolderUploadDocumentParamsDocumentTypeCommercialLicense),
DocumentType: lithic.F(lithic.AccountHolderUploadDocumentParamsDocumentTypeDriversLicense),
},
)
if err != nil {
Expand Down
9 changes: 7 additions & 2 deletions aggregatebalance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package lithic_test
import (
"context"
"errors"
"os"
"testing"

"github.com/lithic-com/lithic-go"
Expand All @@ -13,11 +14,15 @@ import (
)

func TestAggregateBalanceListWithOptionalParams(t *testing.T) {
if !testutil.CheckTestServer(t) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
}
if !testutil.CheckTestServer(t, baseURL) {
return
}
client := lithic.NewClient(
option.WithBaseURL("http://127.0.0.1:4010"),
option.WithBaseURL(baseURL),
option.WithAPIKey("APIKey"),
)
_, err := client.AggregateBalances.List(context.TODO(), lithic.AggregateBalanceListParams{
Expand Down
Loading