subscriptionChargeCreditSettingsUpdate
Change the depletion and auto top-up settings of a subscription charge. The subscriptionChargeCreditSettingsUpdate mutation in Bunny's GraphQL API, with its input attributes, return type and an example request.
Scope required: billing:write
mutation subscriptionChargeCreditSettingsUpdate ($id: ID!, $depletionPolicy: CreditDepletionPolicy, $topUpThreshold: BigDecimal, $topUpQuantity: BigDecimal, $topUpTarget: BigDecimal, $topUpMaxPerMonth: Int) {
subscriptionChargeCreditSettingsUpdate (id: $id, depletionPolicy: $depletionPolicy, topUpThreshold: $topUpThreshold, topUpQuantity: $topUpQuantity, topUpTarget: $topUpTarget, topUpMaxPerMonth: $topUpMaxPerMonth) {
subscriptionCharge {
amount
code
createdAt
creditValidityMonths
currencyId
discount
discountedPrice
endDate
expired
fullyBilled
id
invoiceLineText
isAmendment
isRamp
name
periodPrice
price
priceDecimals
priceListChargeId
priceListId
prorationRate
quantity
quantityMax
quantityMin
selfServiceQuantity
startDate
subscriptionId
subtotal
taxAmount
tieredAveragePrice
topUpChargeId
topUpMaxPerMonth
topUpPrice
topUpQuantity
topUpTarget
topUpThreshold
trial
updatedAt
usageCredits
}
}
}
ArgumentsLink to Arguments section
{
"id": "456123",
"depletionPolicy": "CreditDepletionPolicy",
"topUpThreshold": "BigDecimal",
"topUpQuantity": "BigDecimal",
"topUpTarget": "BigDecimal",
"topUpMaxPerMonth": 123
}
| Name | Type | Description |
|---|---|---|
| id | ID | |
| depletionPolicy | CreditDepletionPolicy | |
| topUpThreshold | BigDecimal | |
| topUpQuantity | BigDecimal | |
| topUpTarget | BigDecimal | |
| topUpMaxPerMonth | Int |
ResponseLink to Response section
| Name | Type | Description |
|---|---|---|
| subscriptionCharge | SubscriptionCharge |