Mutation
mutation PreviewCreditGrant($input: PreviewCreditGrantInput!) {
previewCreditGrant(input: $input) {
credits {
initial {
amount
currency
}
remaining {
amount
currency
}
used {
amount
currency
}
}
discount {
amount
currency
}
discountDetails {
durationInMonths
durationType
end
name
start
type
}
subTotal {
amount
currency
}
tax {
amount
currency
}
taxDetails {
displayName
inclusive
percentage
}
}
}Variables
{
"input": {
"amount": 1.5,
"cost": {
"amount": 1.5
},
"currencyId": "string",
"customerId": "string"
}
}Response
{
"data": {
"previewCreditGrant": {
"credits": {
"initial": {
"amount": 1.5,
"currency": "AED"
},
"remaining": {
"amount": 1.5,
"currency": "AED"
},
"used": {
"amount": 1.5,
"currency": "AED"
}
},
"discount": {
"amount": 1.5,
"currency": "AED"
},
"discountDetails": {
"durationInMonths": 1.5,
"durationType": "FOREVER",
"end": "value",
"name": "string",
"start": "value",
"type": "FIXED"
},
"subTotal": {
"amount": 1.5,
"currency": "AED"
},
"tax": {
"amount": 1.5,
"currency": "AED"
},
"taxDetails": {
"displayName": "string",
"inclusive": true,
"percentage": 1.5
}
}
}
}Mutations
previewCreditGrant
MUTATION
previewCreditGrant(input: PreviewCreditGrantInput!): CreditGrantPreview!Arguments
input
required
Returns
credits
discount
discountDetails
subTotal
tax
taxDetails
total
totalExcludingTax
Mutation
mutation PreviewCreditGrant($input: PreviewCreditGrantInput!) {
previewCreditGrant(input: $input) {
credits {
initial {
amount
currency
}
remaining {
amount
currency
}
used {
amount
currency
}
}
discount {
amount
currency
}
discountDetails {
durationInMonths
durationType
end
name
start
type
}
subTotal {
amount
currency
}
tax {
amount
currency
}
taxDetails {
displayName
inclusive
percentage
}
}
}Variables
{
"input": {
"amount": 1.5,
"cost": {
"amount": 1.5
},
"currencyId": "string",
"customerId": "string"
}
}Response
{
"data": {
"previewCreditGrant": {
"credits": {
"initial": {
"amount": 1.5,
"currency": "AED"
},
"remaining": {
"amount": 1.5,
"currency": "AED"
},
"used": {
"amount": 1.5,
"currency": "AED"
}
},
"discount": {
"amount": 1.5,
"currency": "AED"
},
"discountDetails": {
"durationInMonths": 1.5,
"durationType": "FOREVER",
"end": "value",
"name": "string",
"start": "value",
"type": "FIXED"
},
"subTotal": {
"amount": 1.5,
"currency": "AED"
},
"tax": {
"amount": 1.5,
"currency": "AED"
},
"taxDetails": {
"displayName": "string",
"inclusive": true,
"percentage": 1.5
}
}
}
}