From bf6a49ab312d7e99be0da6c893b748c1bf6e6298 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 8 Oct 2019 12:12:56 -0300 Subject: [PATCH] Bug 23770: Add to_api_mapping method to Koha::City Signed-off-by: Tomas Cohen Arazi --- Koha/City.pm | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Koha/City.pm b/Koha/City.pm index b84b5c3c7f..8fad9b1691 100644 --- a/Koha/City.pm +++ b/Koha/City.pm @@ -29,11 +29,28 @@ Koha::City - Koha City Object class =head1 API -=head2 Class Methods +=head2 Class methods + +=head3 to_api_mapping + +This method returns the mapping for representing a Koha::City object +on the API. =cut -=head3 type +sub to_api_mapping { + return { + cityid => 'city_id', + city_country => 'country', + city_name => 'name', + city_state => 'state', + city_zipcode => 'postal_code' + }; +} + +=head2 Internal methods + +=head3 _type =cut -- 2.23.0