Skip to content

Commit

Permalink
feat(api): move rate plans and plans under zone (#3049)
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 57b80fa commit 94308fd
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 547 deletions.
42 changes: 21 additions & 21 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,27 @@ Methods:
- <code title="put /zones/{identifier}/subscription">client.Zones.Subscriptions.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#SubscriptionService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, identifier <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones">zones</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#SubscriptionUpdateParams">SubscriptionUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones">zones</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#interface{}">interface{}</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{identifier}/subscription">client.Zones.Subscriptions.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#SubscriptionService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, identifier <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones">zones</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#interface{}">interface{}</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

## Plans

Response Types:

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

Methods:

- <code title="get /zones/{zone_id}/available_plans">client.Zones.Plans.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#PlanService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones">zones</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#PlanListParams">PlanListParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/pagination#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones">zones</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#AvailableRatePlan">AvailableRatePlan</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{zone_id}/available_plans/{plan_identifier}">client.Zones.Plans.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#PlanService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, planIdentifier <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones">zones</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#PlanGetParams">PlanGetParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones">zones</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#AvailableRatePlan">AvailableRatePlan</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

## RatePlans

Response Types:

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

Methods:

- <code title="get /zones/{zone_id}/available_rate_plans">client.Zones.RatePlans.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#RatePlanService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones">zones</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#RatePlanGetParams">RatePlanGetParams</a>) ([]<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones">zones</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/zones#RatePlanGetResponse">RatePlanGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

# LoadBalancers

Params Types:
Expand Down Expand Up @@ -804,27 +825,6 @@ Methods:
- <code title="patch /zones/{zone_id}/argo/tiered_caching">client.Argo.TieredCaching.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/argo#TieredCachingService.Edit">Edit</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/argo">argo</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/argo#TieredCachingEditParams">TieredCachingEditParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/argo">argo</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/argo#TieredCachingEditResponse">TieredCachingEditResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{zone_id}/argo/tiered_caching">client.Argo.TieredCaching.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/argo#TieredCachingService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/argo">argo</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/argo#TieredCachingGetParams">TieredCachingGetParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/argo">argo</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/argo#TieredCachingGetResponse">TieredCachingGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

# Plans

Response Types:

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

Methods:

- <code title="get /zones/{zone_id}/available_plans">client.Plans.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/plans#PlanService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/plans">plans</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/plans#PlanListParams">PlanListParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/pagination#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/plans">plans</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/plans#AvailableRatePlan">AvailableRatePlan</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{zone_id}/available_plans/{plan_identifier}">client.Plans.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/plans#PlanService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, planIdentifier <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/plans">plans</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/plans#PlanGetParams">PlanGetParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/plans">plans</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/plans#AvailableRatePlan">AvailableRatePlan</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

# RatePlans

Response Types:

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

Methods:

- <code title="get /zones/{zone_id}/available_rate_plans">client.RatePlans.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rate_plans#RatePlanService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rate_plans">rate_plans</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rate_plans#RatePlanGetParams">RatePlanGetParams</a>) ([]<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rate_plans">rate_plans</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rate_plans#RatePlan">RatePlan</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

# CertificateAuthorities

## HostnameAssociations
Expand Down
6 changes: 0 additions & 6 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ import (
"github.com/cloudflare/cloudflare-go/v2/page_shield"
"github.com/cloudflare/cloudflare-go/v2/pagerules"
"github.com/cloudflare/cloudflare-go/v2/pages"
"github.com/cloudflare/cloudflare-go/v2/plans"
"github.com/cloudflare/cloudflare-go/v2/queues"
"github.com/cloudflare/cloudflare-go/v2/r2"
"github.com/cloudflare/cloudflare-go/v2/radar"
"github.com/cloudflare/cloudflare-go/v2/rate_limits"
"github.com/cloudflare/cloudflare-go/v2/rate_plans"
"github.com/cloudflare/cloudflare-go/v2/registrar"
"github.com/cloudflare/cloudflare-go/v2/request_tracers"
"github.com/cloudflare/cloudflare-go/v2/rules"
Expand Down Expand Up @@ -112,8 +110,6 @@ type Client struct {
SSL *ssl.SSLService
ACM *acm.ACMService
Argo *argo.ArgoService
Plans *plans.PlanService
RatePlans *rate_plans.RatePlanService
CertificateAuthorities *certificate_authorities.CertificateAuthorityService
ClientCertificates *client_certificates.ClientCertificateService
CustomCertificates *custom_certificates.CustomCertificateService
Expand Down Expand Up @@ -222,8 +218,6 @@ func NewClient(opts ...option.RequestOption) (r *Client) {
r.SSL = ssl.NewSSLService(opts...)
r.ACM = acm.NewACMService(opts...)
r.Argo = argo.NewArgoService(opts...)
r.Plans = plans.NewPlanService(opts...)
r.RatePlans = rate_plans.NewRatePlanService(opts...)
r.CertificateAuthorities = certificate_authorities.NewCertificateAuthorityService(opts...)
r.ClientCertificates = client_certificates.NewClientCertificateService(opts...)
r.CustomCertificates = custom_certificates.NewCustomCertificateService(opts...)
Expand Down
238 changes: 0 additions & 238 deletions plans/aliases.go

This file was deleted.

Loading

0 comments on commit 94308fd

Please sign in to comment.