From d99944c9836104601185934bde323db8f143a47a Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Thu, 23 Jul 2026 09:28:19 +0000 Subject: [PATCH] Generate cost --- services/cost/oas_commit | 2 +- .../cost/v3api/model_detailed_service_cost.go | 32 ++++++++++++++++- services/cost/v3api/model_report_data.go | 34 +++++++++++++++++-- 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/services/cost/oas_commit b/services/cost/oas_commit index c08a6770d..1538b64bb 100644 --- a/services/cost/oas_commit +++ b/services/cost/oas_commit @@ -1 +1 @@ -4407196dbbef4e53e6798809e856725cbc84ae05 +d5bd75f47f4b364fa6f71663efb4ba41ec703ac8 diff --git a/services/cost/v3api/model_detailed_service_cost.go b/services/cost/v3api/model_detailed_service_cost.go index cd8fd845b..1e00efead 100644 --- a/services/cost/v3api/model_detailed_service_cost.go +++ b/services/cost/v3api/model_detailed_service_cost.go @@ -34,6 +34,8 @@ type DetailedServiceCost struct { TotalDiscount float64 `json:"totalDiscount"` // Total quantity TotalQuantity int32 `json:"totalQuantity"` + // Total quantity in decimal format, returned as string to preserve precision. NOTE: This field will be removed in future versions and `totalQuantity` will become a decimal. + TotalQuantityDecimal string `json:"totalQuantityDecimal"` // Label for unit UnitLabel string `json:"unitLabel"` AdditionalProperties map[string]interface{} @@ -45,7 +47,7 @@ type _DetailedServiceCost DetailedServiceCost // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewDetailedServiceCost(serviceCategoryName string, serviceName string, sku string, totalCharge float64, totalDiscount float64, totalQuantity int32, unitLabel string) *DetailedServiceCost { +func NewDetailedServiceCost(serviceCategoryName string, serviceName string, sku string, totalCharge float64, totalDiscount float64, totalQuantity int32, totalQuantityDecimal string, unitLabel string) *DetailedServiceCost { this := DetailedServiceCost{} this.ServiceCategoryName = serviceCategoryName this.ServiceName = serviceName @@ -53,6 +55,7 @@ func NewDetailedServiceCost(serviceCategoryName string, serviceName string, sku this.TotalCharge = totalCharge this.TotalDiscount = totalDiscount this.TotalQuantity = totalQuantity + this.TotalQuantityDecimal = totalQuantityDecimal this.UnitLabel = unitLabel return &this } @@ -241,6 +244,30 @@ func (o *DetailedServiceCost) SetTotalQuantity(v int32) { o.TotalQuantity = v } +// GetTotalQuantityDecimal returns the TotalQuantityDecimal field value +func (o *DetailedServiceCost) GetTotalQuantityDecimal() string { + if o == nil { + var ret string + return ret + } + + return o.TotalQuantityDecimal +} + +// GetTotalQuantityDecimalOk returns a tuple with the TotalQuantityDecimal field value +// and a boolean to check if the value has been set. +func (o *DetailedServiceCost) GetTotalQuantityDecimalOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TotalQuantityDecimal, true +} + +// SetTotalQuantityDecimal sets field value +func (o *DetailedServiceCost) SetTotalQuantityDecimal(v string) { + o.TotalQuantityDecimal = v +} + // GetUnitLabel returns the UnitLabel field value func (o *DetailedServiceCost) GetUnitLabel() string { if o == nil { @@ -284,6 +311,7 @@ func (o DetailedServiceCost) ToMap() (map[string]interface{}, error) { toSerialize["totalCharge"] = o.TotalCharge toSerialize["totalDiscount"] = o.TotalDiscount toSerialize["totalQuantity"] = o.TotalQuantity + toSerialize["totalQuantityDecimal"] = o.TotalQuantityDecimal toSerialize["unitLabel"] = o.UnitLabel for key, value := range o.AdditionalProperties { @@ -304,6 +332,7 @@ func (o *DetailedServiceCost) UnmarshalJSON(data []byte) (err error) { "totalCharge", "totalDiscount", "totalQuantity", + "totalQuantityDecimal", "unitLabel", } @@ -341,6 +370,7 @@ func (o *DetailedServiceCost) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "totalCharge") delete(additionalProperties, "totalDiscount") delete(additionalProperties, "totalQuantity") + delete(additionalProperties, "totalQuantityDecimal") delete(additionalProperties, "unitLabel") o.AdditionalProperties = additionalProperties } diff --git a/services/cost/v3api/model_report_data.go b/services/cost/v3api/model_report_data.go index 3d5bef9d3..7f74f7ccc 100644 --- a/services/cost/v3api/model_report_data.go +++ b/services/cost/v3api/model_report_data.go @@ -25,7 +25,9 @@ type ReportData struct { // Discount, value in cents Discount float64 `json:"discount"` // Quantity - Quantity int32 `json:"quantity"` + Quantity int32 `json:"quantity"` + // Quantity in decimal format, returned as string to preserve precision. NOTE: This field will be removed in future versions and `totalQuantity` will become a decimal. + QuantityDecimal string `json:"quantityDecimal"` TimePeriod ReportDataTimePeriod `json:"timePeriod"` AdditionalProperties map[string]interface{} } @@ -36,11 +38,12 @@ type _ReportData ReportData // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewReportData(charge float64, discount float64, quantity int32, timePeriod ReportDataTimePeriod) *ReportData { +func NewReportData(charge float64, discount float64, quantity int32, quantityDecimal string, timePeriod ReportDataTimePeriod) *ReportData { this := ReportData{} this.Charge = charge this.Discount = discount this.Quantity = quantity + this.QuantityDecimal = quantityDecimal this.TimePeriod = timePeriod return &this } @@ -125,6 +128,30 @@ func (o *ReportData) SetQuantity(v int32) { o.Quantity = v } +// GetQuantityDecimal returns the QuantityDecimal field value +func (o *ReportData) GetQuantityDecimal() string { + if o == nil { + var ret string + return ret + } + + return o.QuantityDecimal +} + +// GetQuantityDecimalOk returns a tuple with the QuantityDecimal field value +// and a boolean to check if the value has been set. +func (o *ReportData) GetQuantityDecimalOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.QuantityDecimal, true +} + +// SetQuantityDecimal sets field value +func (o *ReportData) SetQuantityDecimal(v string) { + o.QuantityDecimal = v +} + // GetTimePeriod returns the TimePeriod field value func (o *ReportData) GetTimePeriod() ReportDataTimePeriod { if o == nil { @@ -162,6 +189,7 @@ func (o ReportData) ToMap() (map[string]interface{}, error) { toSerialize["charge"] = o.Charge toSerialize["discount"] = o.Discount toSerialize["quantity"] = o.Quantity + toSerialize["quantityDecimal"] = o.QuantityDecimal toSerialize["timePeriod"] = o.TimePeriod for key, value := range o.AdditionalProperties { @@ -179,6 +207,7 @@ func (o *ReportData) UnmarshalJSON(data []byte) (err error) { "charge", "discount", "quantity", + "quantityDecimal", "timePeriod", } @@ -212,6 +241,7 @@ func (o *ReportData) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "charge") delete(additionalProperties, "discount") delete(additionalProperties, "quantity") + delete(additionalProperties, "quantityDecimal") delete(additionalProperties, "timePeriod") o.AdditionalProperties = additionalProperties }