Get Details
Get plan details
client.v1.plans.getDetails(PlanGetDetailsParamsparams, RequestOptionsoptions?): dataPlanDetailPlanGetDetailsResponse
get/v1/planDetails/{plan_id}
Fetch high level details of a specific plan.
Parameters
paramsplan_idstringPlanGetDetailsParams
Returns
PlanGetDetailsResponse
import Metronome from '@metronome/sdk';
const client = new Metronome({
bearerToken: 'My Bearer Token',
});
const response = await client.v1.plans.getDetails({ plan_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' });
console.log(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
}
]
}
}