From 71c2a9ec71df586af3d99007ec06c2439ce26478 Mon Sep 17 00:00:00 2001 From: Michael Woodward Date: Thu, 19 Dec 2024 17:55:12 +0000 Subject: [PATCH] Release updates for v3 support --- README.md | 4 ++-- addresses.go | 2 +- adjustments.go | 2 +- businesses.go | 2 +- collection.go | 4 ++-- collection_test.go | 2 +- context.go | 2 +- currencies.go | 2 +- customers.go | 2 +- discounts.go | 2 +- events.go | 2 +- example_create_test.go | 2 +- example_get_test.go | 2 +- example_list_events_test.go | 2 +- example_list_test.go | 2 +- example_simulations_test.go | 4 ++-- example_update_test.go | 2 +- example_webhook_unmarshal_test.go | 4 ++-- example_webhook_verifier_test.go | 2 +- go.mod | 2 +- internal/client/client.go | 2 +- internal/client/client_test.go | 6 +++--- internal/client/directive_include_test.go | 2 +- internal/client/transit_id_test.go | 2 +- internal/client/version.txt | 2 +- internal/response/response.go | 2 +- internal/response/response_api_error_handler.go | 2 +- notifications.go | 4 ++-- options.go | 2 +- paddle.go | 2 +- patch_field_test.go | 2 +- prices.go | 2 +- products.go | 2 +- reports.go | 2 +- shared.go | 4 ++-- simulations.go | 2 +- subscriptions.go | 2 +- transactions.go | 2 +- webhook_verifier_test.go | 2 +- 39 files changed, 47 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 402e2a7..552043b 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Then, reference paddle-go-sdk in a Go program with import: ```go import ( - paddle "github.com/PaddleHQ/paddle-go-sdk/v2" + paddle "github.com/PaddleHQ/paddle-go-sdk/v3" ) ``` @@ -51,7 +51,7 @@ Pass your API key while initializing a new Paddle client. ``` go import ( - paddle "github.com/PaddleHQ/paddle-go-sdk/v2" + paddle "github.com/PaddleHQ/paddle-go-sdk/v3" ) client, err := paddle.New( diff --git a/addresses.go b/addresses.go index a7d3c23..15e826a 100644 --- a/addresses.go +++ b/addresses.go @@ -5,7 +5,7 @@ package paddle import ( "context" - paddleerr "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" + paddleerr "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" ) // ErrAddressLocationNotAllowed represents a `address_location_not_allowed` error. diff --git a/adjustments.go b/adjustments.go index b927e5c..b4711d1 100644 --- a/adjustments.go +++ b/adjustments.go @@ -5,7 +5,7 @@ package paddle import ( "context" - paddleerr "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" + paddleerr "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" ) // ErrAdjustmentTransactionMissingCustomerID represents a `adjustment_transaction_missing_customer_id` error. diff --git a/businesses.go b/businesses.go index 7f6be6e..de9f4fb 100644 --- a/businesses.go +++ b/businesses.go @@ -5,7 +5,7 @@ package paddle import ( "context" - paddleerr "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" + paddleerr "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" ) // ErrBusinessContactEmailDomainNotAllowed represents a `business_contact_email_domain_not_allowed` error. diff --git a/collection.go b/collection.go index 6e8c49e..0732ebe 100644 --- a/collection.go +++ b/collection.go @@ -8,8 +8,8 @@ import ( "net/url" "sync" - "github.com/PaddleHQ/paddle-go-sdk/v2/internal/client" - "github.com/PaddleHQ/paddle-go-sdk/v2/internal/response" + "github.com/PaddleHQ/paddle-go-sdk/v3/internal/client" + "github.com/PaddleHQ/paddle-go-sdk/v3/internal/response" ) // Collection is the response from a listing endpoint in the Paddle API. diff --git a/collection_test.go b/collection_test.go index b8de086..61f1e61 100644 --- a/collection_test.go +++ b/collection_test.go @@ -6,7 +6,7 @@ import ( "errors" "testing" - paddle "github.com/PaddleHQ/paddle-go-sdk/v2" + paddle "github.com/PaddleHQ/paddle-go-sdk/v3" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/context.go b/context.go index 76c111c..35be785 100644 --- a/context.go +++ b/context.go @@ -3,7 +3,7 @@ package paddle import ( "context" - "github.com/PaddleHQ/paddle-go-sdk/v2/internal/client" + "github.com/PaddleHQ/paddle-go-sdk/v3/internal/client" ) // ContextWithTransitID returns a new context with the provided transitID. diff --git a/currencies.go b/currencies.go index 5adf762..c486908 100644 --- a/currencies.go +++ b/currencies.go @@ -1,7 +1,7 @@ // Code generated by the Paddle SDK Generator; DO NOT EDIT. package paddle -import paddleerr "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" +import paddleerr "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" // ErrCurrencyPrimaryBalanceInvalid represents a `currency_primary_balance_invalid` error. // See https://developer.paddle.com/errors/currencies/currency_primary_balance_invalid for more information. diff --git a/customers.go b/customers.go index 0d9e54d..55b7094 100644 --- a/customers.go +++ b/customers.go @@ -5,7 +5,7 @@ package paddle import ( "context" - paddleerr "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" + paddleerr "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" ) // ErrCustomerAlreadyExists represents a `customer_already_exists` error. diff --git a/discounts.go b/discounts.go index 7a6dbf5..c7da6aa 100644 --- a/discounts.go +++ b/discounts.go @@ -5,7 +5,7 @@ package paddle import ( "context" - paddleerr "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" + paddleerr "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" ) // ErrDiscountExpired represents a `discount_expired` error. diff --git a/events.go b/events.go index d96c267..a20979f 100644 --- a/events.go +++ b/events.go @@ -6,7 +6,7 @@ import ( "context" "encoding/json" - paddlenotification "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddlenotification" + paddlenotification "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddlenotification" ) // Event: Represents an event entity. diff --git a/example_create_test.go b/example_create_test.go index 262da91..6efe12a 100644 --- a/example_create_test.go +++ b/example_create_test.go @@ -6,7 +6,7 @@ import ( "os" "time" - paddle "github.com/PaddleHQ/paddle-go-sdk/v2" + paddle "github.com/PaddleHQ/paddle-go-sdk/v3" ) // Demonstrates how to create a new entity. diff --git a/example_get_test.go b/example_get_test.go index 02e6ff3..b912bc0 100644 --- a/example_get_test.go +++ b/example_get_test.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - paddle "github.com/PaddleHQ/paddle-go-sdk/v2" + paddle "github.com/PaddleHQ/paddle-go-sdk/v3" ) // Demonstrates how to get an existing entity. diff --git a/example_list_events_test.go b/example_list_events_test.go index 9024a91..9039393 100644 --- a/example_list_events_test.go +++ b/example_list_events_test.go @@ -6,7 +6,7 @@ import ( "fmt" "os" - paddle "github.com/PaddleHQ/paddle-go-sdk/v2" + paddle "github.com/PaddleHQ/paddle-go-sdk/v3" ) // Demonstrates how to fetch a list of events and iterate over the provided results. diff --git a/example_list_test.go b/example_list_test.go index 5fdf850..9f0bb76 100644 --- a/example_list_test.go +++ b/example_list_test.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - paddle "github.com/PaddleHQ/paddle-go-sdk/v2" + paddle "github.com/PaddleHQ/paddle-go-sdk/v3" ) // Demonstrates how to fetch a list and iterate over the provided results. diff --git a/example_simulations_test.go b/example_simulations_test.go index 8d77690..15f89ca 100644 --- a/example_simulations_test.go +++ b/example_simulations_test.go @@ -6,8 +6,8 @@ import ( "os" "time" - paddle "github.com/PaddleHQ/paddle-go-sdk/v2" - "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddlenotification" + paddle "github.com/PaddleHQ/paddle-go-sdk/v3" + "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddlenotification" ) // Demonstrates how to create a Simulation with Payload and read the Payload back out of the response diff --git a/example_update_test.go b/example_update_test.go index d3cc3ef..392cc48 100644 --- a/example_update_test.go +++ b/example_update_test.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - paddle "github.com/PaddleHQ/paddle-go-sdk/v2" + paddle "github.com/PaddleHQ/paddle-go-sdk/v3" ) // Demonstrates how to update an existing entity. diff --git a/example_webhook_unmarshal_test.go b/example_webhook_unmarshal_test.go index 2d1fed4..cb306ee 100644 --- a/example_webhook_unmarshal_test.go +++ b/example_webhook_unmarshal_test.go @@ -9,8 +9,8 @@ import ( "net/http/httptest" "strings" - paddle "github.com/PaddleHQ/paddle-go-sdk/v2" - "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddlenotification" + paddle "github.com/PaddleHQ/paddle-go-sdk/v3" + "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddlenotification" ) const ( diff --git a/example_webhook_verifier_test.go b/example_webhook_verifier_test.go index fa50242..c7c48bc 100644 --- a/example_webhook_verifier_test.go +++ b/example_webhook_verifier_test.go @@ -8,7 +8,7 @@ import ( "net/http/httptest" "strings" - paddle "github.com/PaddleHQ/paddle-go-sdk/v2" + paddle "github.com/PaddleHQ/paddle-go-sdk/v3" ) const ( diff --git a/go.mod b/go.mod index 0714baf..484f54e 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/PaddleHQ/paddle-go-sdk/v2 +module github.com/PaddleHQ/paddle-go-sdk/v3 go 1.21.0 diff --git a/internal/client/client.go b/internal/client/client.go index 72eabcb..c6732b4 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -13,7 +13,7 @@ import ( "reflect" "strings" - "github.com/PaddleHQ/paddle-go-sdk/v2/internal/response" + "github.com/PaddleHQ/paddle-go-sdk/v3/internal/response" "github.com/ggicci/httpin" "github.com/ggicci/httpin/core" diff --git a/internal/client/client_test.go b/internal/client/client_test.go index def0541..b24c079 100644 --- a/internal/client/client_test.go +++ b/internal/client/client_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "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" + "github.com/PaddleHQ/paddle-go-sdk/v3/internal/client" + "github.com/PaddleHQ/paddle-go-sdk/v3/internal/response" + "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" ) func ptr[V any](v V) *V { diff --git a/internal/client/directive_include_test.go b/internal/client/directive_include_test.go index 4b88935..ad62ff5 100644 --- a/internal/client/directive_include_test.go +++ b/internal/client/directive_include_test.go @@ -4,7 +4,7 @@ import ( "net/http" "testing" - "github.com/PaddleHQ/paddle-go-sdk/v2/internal/client" + "github.com/PaddleHQ/paddle-go-sdk/v3/internal/client" "github.com/ggicci/httpin" "github.com/stretchr/testify/assert" diff --git a/internal/client/transit_id_test.go b/internal/client/transit_id_test.go index 02a1401..044ecf6 100644 --- a/internal/client/transit_id_test.go +++ b/internal/client/transit_id_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/PaddleHQ/paddle-go-sdk/v2/internal/client" + "github.com/PaddleHQ/paddle-go-sdk/v3/internal/client" "github.com/stretchr/testify/assert" ) diff --git a/internal/client/version.txt b/internal/client/version.txt index ac2cdeb..4a36342 100644 --- a/internal/client/version.txt +++ b/internal/client/version.txt @@ -1 +1 @@ -2.1.3 +3.0.0 diff --git a/internal/response/response.go b/internal/response/response.go index 9d85bcd..836394f 100644 --- a/internal/response/response.go +++ b/internal/response/response.go @@ -10,7 +10,7 @@ import ( "net/http" "reflect" - "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" + "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" ) // UnmarshalsResponses is an interface implemented by type that must unmarshal responses for themselves. diff --git a/internal/response/response_api_error_handler.go b/internal/response/response_api_error_handler.go index 8e59d35..a8dc532 100644 --- a/internal/response/response_api_error_handler.go +++ b/internal/response/response_api_error_handler.go @@ -8,7 +8,7 @@ import ( "net/http" "strings" - "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" + "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" ) // ErrUnexpectedResponse is returned when an paddle.Error was expected, but instead received nil. diff --git a/notifications.go b/notifications.go index 50a2484..d1184de 100644 --- a/notifications.go +++ b/notifications.go @@ -6,8 +6,8 @@ import ( "context" "encoding/json" - paddleerr "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" - paddlenotification "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddlenotification" + paddleerr "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" + paddlenotification "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddlenotification" ) // ErrNotificationMaximumActiveSettingsReached represents a `notification_maximum_active_settings_reached` error. diff --git a/options.go b/options.go index 6327d5e..aaed41c 100644 --- a/options.go +++ b/options.go @@ -1,7 +1,7 @@ package paddle import ( - "github.com/PaddleHQ/paddle-go-sdk/v2/internal/client" + "github.com/PaddleHQ/paddle-go-sdk/v3/internal/client" ) // Option is a function that configures the Paddle SDK. diff --git a/paddle.go b/paddle.go index b50fc9e..92e34d6 100644 --- a/paddle.go +++ b/paddle.go @@ -5,7 +5,7 @@ import ( "context" "net/url" - "github.com/PaddleHQ/paddle-go-sdk/v2/internal/client" + "github.com/PaddleHQ/paddle-go-sdk/v3/internal/client" "github.com/hashicorp/go-cleanhttp" ) diff --git a/patch_field_test.go b/patch_field_test.go index 53c7d02..652f614 100644 --- a/patch_field_test.go +++ b/patch_field_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - paddle "github.com/PaddleHQ/paddle-go-sdk/v2" + paddle "github.com/PaddleHQ/paddle-go-sdk/v3" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/prices.go b/prices.go index da72629..eee4c9c 100644 --- a/prices.go +++ b/prices.go @@ -5,7 +5,7 @@ package paddle import ( "context" - paddleerr "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" + paddleerr "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" ) // ErrPriceTrialPeriodMissingFields represents a `price_trial_period_missing_fields` error. diff --git a/products.go b/products.go index 156289f..1cd127c 100644 --- a/products.go +++ b/products.go @@ -5,7 +5,7 @@ package paddle import ( "context" - paddleerr "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" + paddleerr "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" ) // ErrProductTaxCategoryNotApproved represents a `product_tax_category_not_approved` error. diff --git a/reports.go b/reports.go index 2663b24..c4c0eb1 100644 --- a/reports.go +++ b/reports.go @@ -6,7 +6,7 @@ import ( "context" "encoding/json" - paddleerr "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" + paddleerr "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" ) // ErrReportCreationLimitExceeded represents a `report_creation_limit_exceeded` error. diff --git a/shared.go b/shared.go index b9ac19f..2d68150 100644 --- a/shared.go +++ b/shared.go @@ -6,8 +6,8 @@ import ( "encoding/json" "strings" - paddleerr "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" - "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddlenotification" + paddleerr "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" + "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddlenotification" ) // ErrNotFound represents a `not_found` error. diff --git a/simulations.go b/simulations.go index 6e47e15..dc8ba55 100644 --- a/simulations.go +++ b/simulations.go @@ -7,7 +7,7 @@ import ( "encoding/json" "strings" - "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddlenotification" + "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddlenotification" ) // Simulation: Represents a simulation entity. diff --git a/subscriptions.go b/subscriptions.go index e1ffa49..a60b79b 100644 --- a/subscriptions.go +++ b/subscriptions.go @@ -6,7 +6,7 @@ import ( "context" "encoding/json" - paddleerr "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" + paddleerr "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" ) // ErrSubscriptionLockedRenewal represents a `subscription_locked_renewal` error. diff --git a/transactions.go b/transactions.go index 5c94f77..1dd7dc5 100644 --- a/transactions.go +++ b/transactions.go @@ -6,7 +6,7 @@ import ( "context" "encoding/json" - paddleerr "github.com/PaddleHQ/paddle-go-sdk/v2/pkg/paddleerr" + paddleerr "github.com/PaddleHQ/paddle-go-sdk/v3/pkg/paddleerr" ) // ErrTransactionImmutable represents a `transaction_immutable` error. diff --git a/webhook_verifier_test.go b/webhook_verifier_test.go index 6b58e41..2a4a0c2 100644 --- a/webhook_verifier_test.go +++ b/webhook_verifier_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - paddle "github.com/PaddleHQ/paddle-go-sdk/v2" + paddle "github.com/PaddleHQ/paddle-go-sdk/v3" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require"