@@ -, +, @@ parameter in pay method --- Koha/REST/V1/Accountline.pm | 2 +- api/v1/swagger/paths/accountlines.json | 5 +++++ t/db_dependent/api/v1/accountlines.t | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) --- a/Koha/REST/V1/Accountline.pm +++ a/Koha/REST/V1/Accountline.pm @@ -61,7 +61,7 @@ sub pay { } my $body = $c->req->json; - my $amount = defined $body->{amount}; + my $amount = $body->{amount}; my $note = $body->{note} || ''; if ($amount && !looks_like_number($amount)) { --- a/api/v1/swagger/paths/accountlines.json +++ a/api/v1/swagger/paths/accountlines.json @@ -3,6 +3,11 @@ "get": { "operationId": "listAccountlines", "tags": ["accountlines"], + "parameters": [ + { + "$ref": "../parameters.json#/borrowernumberQueryParam" + } + ], "produces": [ "application/json" ], --- a/t/db_dependent/api/v1/accountlines.t +++ a/t/db_dependent/api/v1/accountlines.t @@ -192,7 +192,6 @@ $t->request_ok($tx) ->status_is(404); my $accountline_to_partiallypay = Koha::Account::Lines->search({'borrowernumber' => $borrowernumber, 'amount' => 80})->unblessed()->[0]; - $tx = $t->ua->build_tx(POST => "/api/v1/accountlines/$accountline_to_partiallypay->{accountlines_id}/payment" => json => {amount => 'foo'}); $tx->req->cookies({name => 'CGISESSID', value => $session->id}); $tx->req->env({REMOTE_ADDR => '127.0.0.1'}); --