Bug 32030: Link eHolding with packages
[koha-ffzg.git] / Koha / Quote.pm
index a16e2dd..3ce1985 100644 (file)
@@ -16,9 +16,9 @@ package Koha::Quote;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Carp;
 
 use Koha::Database;
+use Koha::Quotes;
 
 use base qw(Koha::Object);
 
@@ -32,6 +32,22 @@ Koha::Quote - Koha Quote object class
 
 =cut
 
+=head3 to_api_mapping
+
+This method returns the mapping for representing a Koha::Quote object
+on the API.
+
+=cut
+
+sub to_api_mapping {
+    return {
+        id        => 'quote_id',
+        source    => 'source',
+        text      => 'text',
+        timestamp => 'displayed_on',
+    };
+}
+
 =head3 _type
 
 =cut
@@ -40,4 +56,4 @@ sub _type {
     return 'Quote';
 }
 
-1;
\ No newline at end of file
+1;