Skip to content

Commit

Permalink
feat(api): make rate_plan model shared (#3045)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Sep 10, 2024
1 parent a02733b commit cdc3ac5
Show file tree
Hide file tree
Showing 92 changed files with 931 additions and 78 deletions.
10 changes: 10 additions & 0 deletions accounts/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
5 changes: 2 additions & 3 deletions accounts/subscription_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/cloudflare/cloudflare-go/v2/internal/testutil"
"github.com/cloudflare/cloudflare-go/v2/option"
"github.com/cloudflare/cloudflare-go/v2/shared"
"github.com/cloudflare/cloudflare-go/v2/user"
)

func TestSubscriptionNewWithOptionalParams(t *testing.T) {
Expand All @@ -33,7 +32,7 @@ func TestSubscriptionNewWithOptionalParams(t *testing.T) {
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Subscription: shared.SubscriptionParam{
Frequency: cloudflare.F(shared.SubscriptionFrequencyWeekly),
RatePlan: cloudflare.F(user.RatePlanParam{
RatePlan: cloudflare.F(shared.RatePlanParam{
ID: cloudflare.F("free"),
Currency: cloudflare.F("USD"),
ExternallyManaged: cloudflare.F(false),
Expand Down Expand Up @@ -73,7 +72,7 @@ func TestSubscriptionUpdateWithOptionalParams(t *testing.T) {
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Subscription: shared.SubscriptionParam{
Frequency: cloudflare.F(shared.SubscriptionFrequencyWeekly),
RatePlan: cloudflare.F(user.RatePlanParam{
RatePlan: cloudflare.F(shared.RatePlanParam{
ID: cloudflare.F("free"),
Currency: cloudflare.F("USD"),
ExternallyManaged: cloudflare.F(false),
Expand Down
10 changes: 10 additions & 0 deletions acm/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions addressing/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions ai_gateway/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions alerting/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
7 changes: 2 additions & 5 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared#CertificateRequestType">CertificateRequestType</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared#MemberParam">MemberParam</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared#PermissionGrantParam">PermissionGrantParam</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared#RatePlanParam">RatePlanParam</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared#SortDirection">SortDirection</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared#SubscriptionParam">SubscriptionParam</a>

Expand All @@ -18,6 +19,7 @@
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared#ErrorData">ErrorData</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared#Permission">Permission</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared#PermissionGrant">PermissionGrant</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared#RatePlan">RatePlan</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared#ResponseInfo">ResponseInfo</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared#Role">Role</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/shared#Subscription">Subscription</a>
Expand Down Expand Up @@ -198,13 +200,8 @@ Methods:

## Subscriptions

Params Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/user">user</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/user#RatePlanParam">RatePlanParam</a>

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/user">user</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/user#RatePlan">RatePlan</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/user">user</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/user#interface{}">interface{}</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/user">user</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/user#SubscriptionDeleteResponse">SubscriptionDeleteResponse</a>

Expand Down
10 changes: 10 additions & 0 deletions api_gateway/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions argo/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions audit_logs/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions billing/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions bot_management/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions botnet_feed/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions brand_protection/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions cache/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions calls/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions certificate_authorities/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions client_certificates/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions cloud_connector/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions cloudforce_one/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
10 changes: 10 additions & 0 deletions custom_certificates/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type PermissionGrant = shared.PermissionGrant
// This is an alias to an internal type.
type PermissionGrantParam = shared.PermissionGrantParam

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlan = shared.RatePlan

// The rate plan applied to the subscription.
//
// This is an alias to an internal type.
type RatePlanParam = shared.RatePlanParam

// This is an alias to an internal type.
type ResponseInfo = shared.ResponseInfo

Expand Down
Loading

0 comments on commit cdc3ac5

Please sign in to comment.