-package Koha::REST::V1::Checkout;
+package Koha::REST::V1::Checkouts;
# This file is part of Koha.
#
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 };
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 };
{
"/checkouts": {
"get": {
- "x-mojo-to": "Checkout#list",
+ "x-mojo-to": "Checkouts#list",
"operationId": "listCheckouts",
"tags": ["patrons", "checkouts"],
"parameters": [{
},
"/checkouts/{checkout_id}": {
"get": {
- "x-mojo-to": "Checkout#get",
+ "x-mojo-to": "Checkouts#get",
"operationId": "getCheckout",
"tags": ["patrons", "checkouts"],
"parameters": [{
},
"/checkouts/{checkout_id}/renewal": {
"post": {
- "x-mojo-to": "Checkout#renew",
+ "x-mojo-to": "Checkouts#renew",
"operationId": "renewCheckout",
"tags": ["patrons", "checkouts"],
"parameters": [{