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

Remove SKU resource #1557

Merged
merged 2 commits into from
Oct 17, 2022
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
4 changes: 0 additions & 4 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ import (
"github.com/stripe/stripe-go/v73/setupintent"
"github.com/stripe/stripe-go/v73/shippingrate"
sigmascheduledqueryrun "github.com/stripe/stripe-go/v73/sigma/scheduledqueryrun"
"github.com/stripe/stripe-go/v73/sku"
"github.com/stripe/stripe-go/v73/source"
"github.com/stripe/stripe-go/v73/sourcetransaction"
"github.com/stripe/stripe-go/v73/subscription"
Expand Down Expand Up @@ -242,8 +241,6 @@ type API struct {
ShippingRates *shippingrate.Client
// SigmaScheduledQueryRuns is the client used to invoke /sigma/scheduled_query_runs APIs.
SigmaScheduledQueryRuns *sigmascheduledqueryrun.Client
// Skus is the client used to invoke /skus APIs.
Skus *sku.Client
// Sources is the client used to invoke /sources APIs.
Sources *source.Client
// SourceTransactions is the client used to invoke sourcetransaction related APIs.
Expand Down Expand Up @@ -397,7 +394,6 @@ func (a *API) Init(key string, backends *stripe.Backends) {
a.SetupIntents = &setupintent.Client{B: backends.API, Key: key}
a.ShippingRates = &shippingrate.Client{B: backends.API, Key: key}
a.SigmaScheduledQueryRuns = &sigmascheduledqueryrun.Client{B: backends.API, Key: key}
a.Skus = &sku.Client{B: backends.API, Key: key}
a.Sources = &source.Client{B: backends.API, Key: key}
a.SourceTransactions = &sourcetransaction.Client{B: backends.API, Key: key}
a.SubscriptionItems = &subscriptionitem.Client{B: backends.API, Key: key}
Expand Down
43 changes: 0 additions & 43 deletions example/generated_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ import (
setupintent "github.com/stripe/stripe-go/v73/setupintent"
shippingrate "github.com/stripe/stripe-go/v73/shippingrate"
sigma_scheduledqueryrun "github.com/stripe/stripe-go/v73/sigma/scheduledqueryrun"
sku "github.com/stripe/stripe-go/v73/sku"
source "github.com/stripe/stripe-go/v73/source"
taxcode "github.com/stripe/stripe-go/v73/taxcode"
taxid "github.com/stripe/stripe-go/v73/taxid"
Expand Down Expand Up @@ -1970,48 +1969,6 @@ func TestSigmaScheduledQueryRunRetrieve(t *testing.T) {
assert.NotNil(t, result)
}

func TestSKUList(t *testing.T) {
params := &stripe.SKUListParams{}
params.Limit = stripe.Int64(3)
result := sku.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
}

func TestSKUCreate(t *testing.T) {
params := &stripe.SKUParams{
Attributes: map[string]string{"size": "Medium", "gender": "Unisex"},
Price: stripe.Int64(1500),
Currency: stripe.String(string(stripe.CurrencyUSD)),
Inventory: &stripe.SKUInventoryParams{
Type: stripe.String(string(stripe.SKUInventoryTypeFinite)),
Quantity: stripe.Int64(500),
},
Product: stripe.String("prod_xxxxxxxxxxxxx"),
}
result, _ := sku.New(params)
assert.NotNil(t, result)
}

func TestSKUDelete(t *testing.T) {
params := &stripe.SKUParams{}
result, _ := sku.Del("sku_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
}

func TestSKURetrieve(t *testing.T) {
params := &stripe.SKUParams{}
result, _ := sku.Get("sku_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
}

func TestSKUUpdate(t *testing.T) {
params := &stripe.SKUParams{}
params.AddMetadata("order_id", "6735")
result, _ := sku.Update("sku_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
}

func TestSourceRetrieve(t *testing.T) {
params := &stripe.SourceParams{}
result, _ := source.Get("src_xxxxxxxxxxxxx", params)
Expand Down
154 changes: 0 additions & 154 deletions sku.go

This file was deleted.

115 changes: 0 additions & 115 deletions sku/client.go

This file was deleted.

Loading