Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: IBM/platform-services-go-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.78.2
Choose a base ref
...
head repository: IBM/platform-services-go-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.79.0
Choose a head ref
  • 3 commits
  • 6 files changed
  • 2 contributors

Commits on Mar 17, 2025

  1. feat(Usage Reports): added subscription_id, created_at, deleted_at to…

    … InstanceUsage API response (#379)
    
    Signed-off-by: Sowmya Kelam <sowmya.kelam@ibm.com>
    sowmyakelam authored Mar 17, 2025
    Copy the full SHA
    e225c3e View commit details
  2. Copy the full SHA
    21c3d19 View commit details
  3. chore(release): 0.79.0 release notes [skip ci]

    # [0.79.0](v0.78.2...v0.79.0) (2025-03-17)
    
    ### Features
    
    * **Usage Reports:** added subscription_id, created_at, deleted_at to InstanceUsage API response ([#379](#379)) ([e225c3e](e225c3e))
    semantic-release-bot committed Mar 17, 2025
    Copy the full SHA
    e6ba2e8 View commit details
Showing with 80 additions and 33 deletions.
  1. +1 −1 .bumpversion.toml
  2. +7 −0 CHANGELOG.md
  3. +2 −2 README.md
  4. +1 −1 common/version.go
  5. +34 −2 usagereportsv4/usage_reports_v4.go
  6. +35 −27 usagereportsv4/usage_reports_v4_test.go
2 changes: 1 addition & 1 deletion .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "0.78.2"
current_version = "0.79.0"
commit = true
message = "Update version {current_version} -> {new_version} [skip ci]"

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [0.79.0](https://github.com/IBM/platform-services-go-sdk/compare/v0.78.2...v0.79.0) (2025-03-17)


### Features

* **Usage Reports:** added subscription_id, created_at, deleted_at to InstanceUsage API response ([#379](https://github.com/IBM/platform-services-go-sdk/issues/379)) ([e225c3e](https://github.com/IBM/platform-services-go-sdk/commit/e225c3e4564a9f79abdf175ad9971ca88538c037))

## [0.78.2](https://github.com/IBM/platform-services-go-sdk/compare/v0.78.1...v0.78.2) (2025-03-12)


4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
[![CLA assistant](https://cla-assistant.io/readme/badge/IBM/platform-services-go-sdk)](https://cla-assistant.io/IBM/platform-services-go-sdk)


# IBM Cloud Platform Services Go SDK Version 0.78.2
# IBM Cloud Platform Services Go SDK Version 0.79.0

Go client library to interact with various
[IBM Cloud Platform Service APIs](https://cloud.ibm.com/docs?tab=api-docs&category=platform_services).
@@ -87,7 +87,7 @@ Service Name | Package name
* Go version 1.23 or above.

## Installation
The current version of this SDK: 0.78.2
The current version of this SDK: 0.79.0

### Go modules
If your application uses Go modules for dependency management (recommended), just add an import for each service
2 changes: 1 addition & 1 deletion common/version.go
Original file line number Diff line number Diff line change
@@ -17,4 +17,4 @@
package common

// Version of the SDK
const Version = "0.78.2"
const Version = "0.79.0"
36 changes: 34 additions & 2 deletions usagereportsv4/usage_reports_v4.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2024.
* (C) Copyright IBM Corp. 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/

/*
* IBM OpenAPI SDK Code Generator Version: 3.96.0-d6dec9d7-20241008-212902
* IBM OpenAPI SDK Code Generator Version: 3.102.0-615ec964-20250307-203034
*/

// Package usagereportsv4 : Operations and models for the UsageReportsV4 service
@@ -2389,6 +2389,15 @@ type InstanceUsage struct {
// The ID of the pricing plan used to rate the usage.
PricingPlanID *string `json:"pricing_plan_id,omitempty"`

// The ID of service subscription with effective from timestamp.
SubscriptionID *string `json:"subscription_id,omitempty"`

// The timestamp in RFC 3339 string format at which instance is created.
CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

// The timestamp in RFC 3339 string format at which instance is deleted.
DeletedAt *strfmt.DateTime `json:"deleted_at,omitempty"`

// The month.
Month *string `json:"month" validate:"required"`

@@ -2521,6 +2530,21 @@ func UnmarshalInstanceUsage(m map[string]json.RawMessage, result interface{}) (e
err = core.SDKErrorf(err, "", "pricing_plan_id-error", common.GetComponentInfo())
return
}
err = core.UnmarshalPrimitive(m, "subscription_id", &obj.SubscriptionID)
if err != nil {
err = core.SDKErrorf(err, "", "subscription_id-error", common.GetComponentInfo())
return
}
err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
if err != nil {
err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo())
return
}
err = core.UnmarshalPrimitive(m, "deleted_at", &obj.DeletedAt)
if err != nil {
err = core.SDKErrorf(err, "", "deleted_at-error", common.GetComponentInfo())
return
}
err = core.UnmarshalPrimitive(m, "month", &obj.Month)
if err != nil {
err = core.SDKErrorf(err, "", "month-error", common.GetComponentInfo())
@@ -2975,6 +2999,9 @@ type Plan struct {
// Total pre-discounted cost incurred by the plan.
RatedCost *float64 `json:"rated_cost" validate:"required"`

// The ID of service subscription with effective from timestamp.
SubscriptionID *string `json:"subscription_id,omitempty"`

// All the metrics in the plan.
Usage []Metric `json:"usage" validate:"required"`

@@ -3023,6 +3050,11 @@ func UnmarshalPlan(m map[string]json.RawMessage, result interface{}) (err error)
err = core.SDKErrorf(err, "", "rated_cost-error", common.GetComponentInfo())
return
}
err = core.UnmarshalPrimitive(m, "subscription_id", &obj.SubscriptionID)
if err != nil {
err = core.SDKErrorf(err, "", "subscription_id-error", common.GetComponentInfo())
return
}
err = core.UnmarshalModel(m, "usage", &obj.Usage, UnmarshalMetric)
if err != nil {
err = core.SDKErrorf(err, "", "usage-error", common.GetComponentInfo())
Loading