From 02a36d971d5a6a01f0aa2eb60463982337b6f11a Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 29 Aug 2024 17:07:11 +0200 Subject: [PATCH] fix: deprecate pricing floating ip field See https://docs.hetzner.cloud/changelog#2024-08-29-field-floating_ip-in-pricing-response-is-now-deprecated --- hcloud/pricing.go | 3 ++- hcloud/schema/pricing.go | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hcloud/pricing.go b/hcloud/pricing.go index b12f3779..22c37fbf 100644 --- a/hcloud/pricing.go +++ b/hcloud/pricing.go @@ -8,7 +8,8 @@ import ( // Pricing specifies pricing information for various resources. type Pricing struct { - Image ImagePricing + Image ImagePricing + // Deprecated: [Pricing.FloatingIP] is deprecated, use [Pricing.FloatingIPs] instead. FloatingIP FloatingIPPricing FloatingIPs []FloatingIPTypePricing PrimaryIPs []PrimaryIPPricing diff --git a/hcloud/schema/pricing.go b/hcloud/schema/pricing.go index 18f53fb8..c1adbb1b 100644 --- a/hcloud/schema/pricing.go +++ b/hcloud/schema/pricing.go @@ -2,9 +2,10 @@ package schema // Pricing defines the schema for pricing information. type Pricing struct { - Currency string `json:"currency"` - VATRate string `json:"vat_rate"` - Image PricingImage `json:"image"` + Currency string `json:"currency"` + VATRate string `json:"vat_rate"` + Image PricingImage `json:"image"` + // Deprecated: [Pricing.FloatingIP] is deprecated, use [Pricing.FloatingIPs] instead. FloatingIP PricingFloatingIP `json:"floating_ip"` FloatingIPs []PricingFloatingIPType `json:"floating_ips"` PrimaryIPs []PricingPrimaryIP `json:"primary_ips"`