List Price Adjustments
Get the plan adjustments for a customer
client.V1.Customers.Plans.ListPriceAdjustments(ctx, params) (*CursorPage[ChargeIDstringChargeTypeV1CustomerPlanListPriceAdjustmentsResponseChargeTypePricesarrayStartPeriodfloat64Quantityfloat64V1CustomerPlanListPriceAdjustmentsResponse], error)
get/v1/customers/{customer_id}/plans/{customer_plan_id}/priceAdjustments
Lists a customer plans adjustments. See the price adjustments documentation for details.
Parameters
paramsCustomerIDfieldCustomerPlanIDfieldLimitfieldNextPagefieldV1CustomerPlanListPriceAdjustmentsParams
Returns
V1CustomerPlanListPriceAdjustmentsResponsestruct
package main
import (
"context"
"fmt"
"github.com/Metronome-Industries/metronome-go"
"github.com/Metronome-Industries/metronome-go/option"
)
func main() {
client := metronome.NewClient(
option.WithBearerToken("My Bearer Token"),
)
page, err := client.V1.Customers.Plans.ListPriceAdjustments(context.TODO(), metronome.V1CustomerPlanListPriceAdjustmentsParams{
CustomerID: metronome.F("d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc"),
CustomerPlanID: metronome.F("7aa11640-0703-4600-8eb9-293f535a6b74"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
200 Example
{
"data": [
{
"charge_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"charge_type": "usage",
"prices": [
{
"adjustment_type": "fixed",
"tier": 0,
"value": 0
}
],
"start_period": 0,
"quantity": 0
}
],
"next_page": "next_page"
}