## List Available Rate Plans `client.Zones.RatePlans.Get(ctx, query) (*SinglePage[RatePlanGetResponse], error)` **get** `/zones/{zone_id}/available_rate_plans` Lists all rate plans the zone can subscribe to. ### Parameters - `query RatePlanGetParams` - `ZoneID param.Field[string]` Identifier ### Returns - `type RatePlanGetResponse struct{…}` - `ID string` Plan identifier tag. - `Components []RatePlanGetResponseComponent` Array of available components values for the plan. - `Default float64` The default amount allocated. - `Name RatePlanGetResponseComponentsName` The unique component. - `const RatePlanGetResponseComponentsNameZones RatePlanGetResponseComponentsName = "zones"` - `const RatePlanGetResponseComponentsNamePageRules RatePlanGetResponseComponentsName = "page_rules"` - `const RatePlanGetResponseComponentsNameDedicatedCertificates RatePlanGetResponseComponentsName = "dedicated_certificates"` - `const RatePlanGetResponseComponentsNameDedicatedCertificatesCustom RatePlanGetResponseComponentsName = "dedicated_certificates_custom"` - `UnitPrice float64` The unit price of the addon. - `Currency string` The monetary unit in which pricing information is displayed. - `Duration float64` The duration of the plan subscription. - `Frequency RatePlanGetResponseFrequency` The frequency at which you will be billed for this plan. - `const RatePlanGetResponseFrequencyWeekly RatePlanGetResponseFrequency = "weekly"` - `const RatePlanGetResponseFrequencyMonthly RatePlanGetResponseFrequency = "monthly"` - `const RatePlanGetResponseFrequencyQuarterly RatePlanGetResponseFrequency = "quarterly"` - `const RatePlanGetResponseFrequencyYearly RatePlanGetResponseFrequency = "yearly"` - `Name string` The plan name. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zones" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.Zones.RatePlans.Get(context.TODO(), zones.RatePlanGetParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": [ { "id": "free", "components": [ { "default": 5, "name": "page_rules", "unit_price": 1 } ], "currency": "USD", "duration": 1, "frequency": "monthly", "name": "Free Plan" } ], "success": true, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ```