From 08b6f7799b2ad06ff4f9ef88e236f5c928c387b5 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 22 Sep 2017 15:37:41 -0300 Subject: [PATCH] Bug 18120: (QA followup) Add POD to controler class Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart --- Koha/REST/V1/Acquisitions/Vendors.pm | 52 ++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/Koha/REST/V1/Acquisitions/Vendors.pm b/Koha/REST/V1/Acquisitions/Vendors.pm index a8302c8bab..a24412952d 100644 --- a/Koha/REST/V1/Acquisitions/Vendors.pm +++ b/Koha/REST/V1/Acquisitions/Vendors.pm @@ -23,6 +23,20 @@ use Koha::Acquisition::Booksellers; use Try::Tiny; +=head1 NAME + +Koha::REST::V1::Acquisitions::Vendors + +=head1 API + +=head2 Methods + +=head3 list_vendors + +Controller function that handles listing Koha::Acquisition::Bookseller objects + +=cut + sub list_vendors { my $c = shift->openapi->valid_input or return; @@ -54,6 +68,12 @@ sub list_vendors { }; } +=head3 get_vendor + +Controller function that handles retrieving a single Koha::Acquisition::Bookseller + +=cut + sub get_vendor { my $c = shift->openapi->valid_input or return; @@ -67,6 +87,12 @@ sub get_vendor { openapi => _to_api($vendor->TO_JSON) ); } +=head3 add_vendor + +Controller function that handles adding a new Koha::Acquisition::Bookseller object + +=cut + sub add_vendor { my $c = shift->openapi->valid_input or return; @@ -89,6 +115,12 @@ sub add_vendor { }; } +=head3 update_vendor + +Controller function that handles updating a Koha::Acquisition::Bookseller object + +=cut + sub update_vendor { my $c = shift->openapi->valid_input or return; @@ -118,6 +150,12 @@ sub update_vendor { } +=head3 delete_vendor + +Controller function that handles deleting a Koha::Acquisition::Bookseller object + +=cut + sub delete_vendor { my $c = shift->openapi->valid_input or return; @@ -146,6 +184,13 @@ sub delete_vendor { } +=head3 _to_api + +Helper function that maps a Koha::Acquisition::Bookseller object into +the attribute names the exposed REST api spec. + +=cut + sub _to_api { my $vendor = shift; @@ -174,6 +219,13 @@ sub _to_api { return $vendor; } +=head3 _to_model + +Helper function that maps REST api objects into Koha::Acquisition::Bookseller +attribute names. + +=cut + sub _to_model { my $vendor_param = shift; -- 2.20.1