Get Details
Get plan details
client.V1.Plans.GetDetails(ctx, query) (*DataPlanDetailV1PlanGetDetailsResponse, error)
get/v1/planDetails/{plan_id}
Fetch high level details of a specific plan.
Parameters
queryPlanIDfieldV1PlanGetDetailsParams
Returns
V1PlanGetDetailsResponsestruct
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"),
)
response, err := client.V1.Plans.GetDetails(context.TODO(), metronome.V1PlanGetDetailsParams{
PlanID: metronome.F("d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
200 Example
{
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"custom_fields": {
"foo": "string"
},
"name": "name",
"credit_grants": [
{
"amount_granted": 0,
"amount_granted_credit_type": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name"
},
"amount_paid": 0,
"amount_paid_credit_type": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name"
},
"effective_duration": 0,
"name": "name",
"priority": "priority",
"send_invoice": true,
"reason": "reason",
"recurrence_duration": 0,
"recurrence_interval": 0
}
],
"description": "description",
"minimums": [
{
"credit_type": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name"
},
"name": "name",
"start_period": 0,
"value": 0
}
],
"overage_rates": [
{
"credit_type": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name"
},
"fiat_credit_type": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name"
},
"start_period": 0,
"to_fiat_conversion_factor": 0
}
]
}
}