Hello, I am trying to confirm via pm.test if the “value” that is returned in " “name”: “Guarantee” " doesn’t equal 0(zero), can someone please help, how to properly make the request?
Here is my response:
{
"id": 0,
"principalSum": 1000.000000,
"instalments": [
{
"id": 0,
"paymentNumber": 1,
"instalmentDate": "2021/10/18",
"instalment": 144.370000,
"instalmentAmount": 144.370000,
"principal": 69.140000,
"interest": 33.330000,
"daysDelay": 3,
"instalmentDay": null,
"paidSum": 0.0,
"productAccruals": [
{
"id": 1,
"accrualId": 1,
"name": "Principal",
"value": 69.140000,
"interestPercent": null,
"isPartApr": true
},
{
"id": 6,
"accrualId": 6,
"name": "Interest",
"value": 33.330000,
"interestPercent": null,
"isPartApr": true
},
{
"id": 17,
"accrualId": 17,
"name": "Guarantee",
"value": 41.900000,
"interestPercent": null,
"isPartApr": false
}
],
"instalmentDiscount": 0.0,
"instalmentAmountWithDiscount": 144.370000
},
{
"id": 0,
"paymentNumber": 2,
"instalmentDate": "2021/10/25",
"instalment": 144.370000,
"instalmentAmount": 144.370000,
"principal": 71.440000,
"interest": 31.030000,
"daysDelay": 0,
"instalmentDay": null,
"paidSum": 0.0,
"productAccruals": [
{
"id": 1,
"accrualId": 1,
"name": "Principal",
"value": 71.440000,
"interestPercent": null,
"isPartApr": true
},
{
"id": 6,
"accrualId": 6,
"name": "Interest",
"value": 31.030000,
"interestPercent": null,
"isPartApr": true
},
{
"id": 17,
"accrualId": 17,
"name": "Guarantee",
"value": 41.900000,
"interestPercent": null,
"isPartApr": false
}
],
"instalmentDiscount": 0.0,
"instalmentAmountWithDiscount": 144.370000
},
the response continues the same way until “paymentNumber”: 12 for example.
We need only for the first one to confirm.