View | Details | Raw Unified | Return to bug 13895
Collapse All | Expand All

(-)a/Koha/REST/V1/Checkout.pm (-5 / +5 lines)
Lines 1-4 Link Here
1
package Koha::REST::V1::Checkout;
1
package Koha::REST::V1::Checkouts;
2
2
3
# This file is part of Koha.
3
# This file is part of Koha.
4
#
4
#
Lines 135-142 attribute names. Link Here
135
sub _to_api {
135
sub _to_api {
136
    my $checkout = shift;
136
    my $checkout = shift;
137
137
138
    foreach my $column ( keys %{ $Koha::REST::V1::Checkout::to_api_mapping } ) {
138
    foreach my $column ( keys %{ $Koha::REST::V1::Checkouts::to_api_mapping } ) {
139
        my $mapped_column = $Koha::REST::V1::Checkout::to_api_mapping->{$column};
139
        my $mapped_column = $Koha::REST::V1::Checkouts::to_api_mapping->{$column};
140
        if ( exists $checkout->{ $column } && defined $mapped_column )
140
        if ( exists $checkout->{ $column } && defined $mapped_column )
141
        {
141
        {
142
            $checkout->{ $mapped_column } = delete $checkout->{ $column };
142
            $checkout->{ $mapped_column } = delete $checkout->{ $column };
Lines 158-165 attribute names. Link Here
158
sub _to_model {
158
sub _to_model {
159
    my $checkout = shift;
159
    my $checkout = shift;
160
160
161
    foreach my $attribute ( keys %{ $Koha::REST::V1::Checkout::to_model_mapping } ) {
161
    foreach my $attribute ( keys %{ $Koha::REST::V1::Checkouts::to_model_mapping } ) {
162
        my $mapped_attribute = $Koha::REST::V1::Checkout::to_model_mapping->{$attribute};
162
        my $mapped_attribute = $Koha::REST::V1::Checkouts::to_model_mapping->{$attribute};
163
        if ( exists $checkout->{ $attribute } && defined $mapped_attribute )
163
        if ( exists $checkout->{ $attribute } && defined $mapped_attribute )
164
        {
164
        {
165
            $checkout->{ $mapped_attribute } = delete $checkout->{ $attribute };
165
            $checkout->{ $mapped_attribute } = delete $checkout->{ $attribute };
(-)a/api/v1/swagger/paths/checkouts.json (-4 / +3 lines)
Lines 1-7 Link Here
1
{
1
{
2
  "/checkouts": {
2
  "/checkouts": {
3
    "get": {
3
    "get": {
4
      "x-mojo-to": "Checkout#list",
4
      "x-mojo-to": "Checkouts#list",
5
      "operationId": "listCheckouts",
5
      "operationId": "listCheckouts",
6
      "tags": ["patrons", "checkouts"],
6
      "tags": ["patrons", "checkouts"],
7
      "parameters": [{
7
      "parameters": [{
Lines 35-41 Link Here
35
  },
35
  },
36
  "/checkouts/{checkout_id}": {
36
  "/checkouts/{checkout_id}": {
37
    "get": {
37
    "get": {
38
      "x-mojo-to": "Checkout#get",
38
      "x-mojo-to": "Checkouts#get",
39
      "operationId": "getCheckout",
39
      "operationId": "getCheckout",
40
      "tags": ["patrons", "checkouts"],
40
      "tags": ["patrons", "checkouts"],
41
      "parameters": [{
41
      "parameters": [{
Lines 65-71 Link Here
65
  },
65
  },
66
  "/checkouts/{checkout_id}/renewal": {
66
  "/checkouts/{checkout_id}/renewal": {
67
    "post": {
67
    "post": {
68
      "x-mojo-to": "Checkout#renew",
68
      "x-mojo-to": "Checkouts#renew",
69
      "operationId": "renewCheckout",
69
      "operationId": "renewCheckout",
70
      "tags": ["patrons", "checkouts"],
70
      "tags": ["patrons", "checkouts"],
71
      "parameters": [{
71
      "parameters": [{
72
- 

Return to bug 13895