Skip to content

Commit

Permalink
fix: Create v2 module (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgrayston-paddle authored Oct 18, 2024
1 parent 540437e commit 8d3d86f
Show file tree
Hide file tree
Showing 38 changed files with 45 additions and 45 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Then, reference paddle-go-sdk in a Go program with import:

```go
import (
paddle "github.com/PaddleHQ/paddle-go-sdk"
paddle "github.com/PaddleHQ/paddle-go-sdk/v2"
)
```

Expand All @@ -51,7 +51,7 @@ Pass your API key while initializing a new Paddle client.

``` go
import (
paddle "github.com/PaddleHQ/paddle-go-sdk"
paddle "github.com/PaddleHQ/paddle-go-sdk/v2"
)

client, err := paddle.New(
Expand Down
2 changes: 1 addition & 1 deletion addresses.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion adjustments.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion businesses.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/url"
"sync"

"github.com/PaddleHQ/paddle-go-sdk/internal/client"
"github.com/PaddleHQ/paddle-go-sdk/internal/response"
"github.com/PaddleHQ/paddle-go-sdk/v2/internal/client"
"github.com/PaddleHQ/paddle-go-sdk/v2/internal/response"
)

// Collection is the response from a listing endpoint in the Paddle API.
Expand Down
2 changes: 1 addition & 1 deletion collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"errors"
"testing"

paddle "github.com/PaddleHQ/paddle-go-sdk"
paddle "github.com/PaddleHQ/paddle-go-sdk/v2"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion context.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package paddle
import (
"context"

"github.com/PaddleHQ/paddle-go-sdk/internal/client"
"github.com/PaddleHQ/paddle-go-sdk/v2/internal/client"
)

// ContextWithTransitID returns a new context with the provided transitID.
Expand Down
2 changes: 1 addition & 1 deletion currencies.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion customers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion discounts.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion events.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"time"

paddle "github.com/PaddleHQ/paddle-go-sdk"
paddle "github.com/PaddleHQ/paddle-go-sdk/v2"
)

// Demonstrates how to create a new entity.
Expand Down
2 changes: 1 addition & 1 deletion example_get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

paddle "github.com/PaddleHQ/paddle-go-sdk"
paddle "github.com/PaddleHQ/paddle-go-sdk/v2"
)

// Demonstrates how to get an existing entity.
Expand Down
2 changes: 1 addition & 1 deletion example_list_events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"os"

paddle "github.com/PaddleHQ/paddle-go-sdk"
paddle "github.com/PaddleHQ/paddle-go-sdk/v2"
)

// Demonstrates how to fetch a list of events and iterate over the provided results.
Expand Down
2 changes: 1 addition & 1 deletion example_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

paddle "github.com/PaddleHQ/paddle-go-sdk"
paddle "github.com/PaddleHQ/paddle-go-sdk/v2"
)

// Demonstrates how to fetch a list and iterate over the provided results.
Expand Down
4 changes: 2 additions & 2 deletions example_simulations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"time"

paddle "github.com/PaddleHQ/paddle-go-sdk"
"github.com/PaddleHQ/paddle-go-sdk/pkg/paddlenotification"
paddle "github.com/PaddleHQ/paddle-go-sdk/v2"
"github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddlenotification"
)

// Demonstrates how to create a Simulation with Payload and read the Payload back out of the response
Expand Down
2 changes: 1 addition & 1 deletion example_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

paddle "github.com/PaddleHQ/paddle-go-sdk"
paddle "github.com/PaddleHQ/paddle-go-sdk/v2"
)

// Demonstrates how to update an existing entity.
Expand Down
2 changes: 1 addition & 1 deletion example_webhook_verifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"strings"

paddle "github.com/PaddleHQ/paddle-go-sdk"
paddle "github.com/PaddleHQ/paddle-go-sdk/v2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/PaddleHQ/paddle-go-sdk
module github.com/PaddleHQ/paddle-go-sdk/v2

go 1.21.0

Expand Down
2 changes: 1 addition & 1 deletion internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"reflect"
"strings"

"github.com/PaddleHQ/paddle-go-sdk/internal/response"
"github.com/PaddleHQ/paddle-go-sdk/v2/internal/response"

"github.com/ggicci/httpin"
"github.com/ggicci/httpin/core"
Expand Down
6 changes: 3 additions & 3 deletions internal/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/PaddleHQ/paddle-go-sdk/internal/client"
"github.com/PaddleHQ/paddle-go-sdk/internal/response"
"github.com/PaddleHQ/paddle-go-sdk/pkg/paddleerr"
"github.com/PaddleHQ/paddle-go-sdk/v2/internal/client"
"github.com/PaddleHQ/paddle-go-sdk/v2/internal/response"
"github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr"
)

func ptr[V any](v V) *V {
Expand Down
2 changes: 1 addition & 1 deletion internal/client/directive_include_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"testing"

"github.com/PaddleHQ/paddle-go-sdk/internal/client"
"github.com/PaddleHQ/paddle-go-sdk/v2/internal/client"

"github.com/ggicci/httpin"
"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion internal/client/transit_id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/PaddleHQ/paddle-go-sdk/internal/client"
"github.com/PaddleHQ/paddle-go-sdk/v2/internal/client"

"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/client/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0
2.1.1
2 changes: 1 addition & 1 deletion internal/response/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"net/http"
"reflect"

"github.com/PaddleHQ/paddle-go-sdk/pkg/paddleerr"
"github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr"
)

// UnmarshalsResponses is an interface implemented by type that must unmarshal responses for themselves.
Expand Down
2 changes: 1 addition & 1 deletion internal/response/response_api_error_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"
"strings"

"github.com/PaddleHQ/paddle-go-sdk/pkg/paddleerr"
"github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr"
)

// ErrUnexpectedResponse is returned when an paddle.Error was expected, but instead received nil.
Expand Down
4 changes: 2 additions & 2 deletions notifications.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package paddle

import (
"github.com/PaddleHQ/paddle-go-sdk/internal/client"
"github.com/PaddleHQ/paddle-go-sdk/v2/internal/client"
)

// Option is a function that configures the Paddle SDK.
Expand Down
2 changes: 1 addition & 1 deletion paddle.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"context"
"net/url"

"github.com/PaddleHQ/paddle-go-sdk/internal/client"
"github.com/PaddleHQ/paddle-go-sdk/v2/internal/client"

"github.com/hashicorp/go-cleanhttp"
)
Expand Down
2 changes: 1 addition & 1 deletion patch_field_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"testing"

paddle "github.com/PaddleHQ/paddle-go-sdk"
paddle "github.com/PaddleHQ/paddle-go-sdk/v2"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion prices.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion products.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion reports.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions shared.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion simulations.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion subscriptions.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion transactions.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webhook_verifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"testing"

paddle "github.com/PaddleHQ/paddle-go-sdk"
paddle "github.com/PaddleHQ/paddle-go-sdk/v2"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down

0 comments on commit 8d3d86f

Please sign in to comment.