From ab4a8755c22269dbe0f8809667c0e0f1e03bc3ea 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 Signed-off-by: Josef Moravec Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize --- 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.39.5