Bug 13895: (QA follow-up) Make the class plural

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eabcec1d6c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Tomas Cohen Arazi 2019-03-27 14:23:18 -03:00 committed by Martin Renvoize
parent 9cf4f1a30d
commit 22d46b5d30
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
package Koha::REST::V1::Checkout;
package Koha::REST::V1::Checkouts;
# This file is part of Koha.
#
@ -135,8 +135,8 @@ attribute names.
sub _to_api {
my $checkout = shift;
foreach my $column ( keys %{ $Koha::REST::V1::Checkout::to_api_mapping } ) {
my $mapped_column = $Koha::REST::V1::Checkout::to_api_mapping->{$column};
foreach my $column ( keys %{ $Koha::REST::V1::Checkouts::to_api_mapping } ) {
my $mapped_column = $Koha::REST::V1::Checkouts::to_api_mapping->{$column};
if ( exists $checkout->{ $column } && defined $mapped_column )
{
$checkout->{ $mapped_column } = delete $checkout->{ $column };
@ -158,8 +158,8 @@ attribute names.
sub _to_model {
my $checkout = shift;
foreach my $attribute ( keys %{ $Koha::REST::V1::Checkout::to_model_mapping } ) {
my $mapped_attribute = $Koha::REST::V1::Checkout::to_model_mapping->{$attribute};
foreach my $attribute ( keys %{ $Koha::REST::V1::Checkouts::to_model_mapping } ) {
my $mapped_attribute = $Koha::REST::V1::Checkouts::to_model_mapping->{$attribute};
if ( exists $checkout->{ $attribute } && defined $mapped_attribute )
{
$checkout->{ $mapped_attribute } = delete $checkout->{ $attribute };

View File

@ -1,7 +1,7 @@
{
"/checkouts": {
"get": {
"x-mojo-to": "Checkout#list",
"x-mojo-to": "Checkouts#list",
"operationId": "listCheckouts",
"tags": ["patrons", "checkouts"],
"parameters": [{
@ -35,7 +35,7 @@
},
"/checkouts/{checkout_id}": {
"get": {
"x-mojo-to": "Checkout#get",
"x-mojo-to": "Checkouts#get",
"operationId": "getCheckout",
"tags": ["patrons", "checkouts"],
"parameters": [{
@ -65,7 +65,7 @@
},
"/checkouts/{checkout_id}/renewal": {
"post": {
"x-mojo-to": "Checkout#renew",
"x-mojo-to": "Checkouts#renew",
"operationId": "renewCheckout",
"tags": ["patrons", "checkouts"],
"parameters": [{