<<

NAME

Koha::Acquisition::Basket - Koha Basket Object class

API

Class methods

bookseller

Returns the vendor

creator

    my $creator = $basket->creator;

Returns the Koha::Patron for the basket creator.

basket_group

Returns the basket group associated to this basket

orders

    my $orders = $basket->orders;

Returns a Koha::Acquisition::Orders resultset, with the orders linked to this basket.

effective_create_items

Returns create_items for this basket, falling back to AcqCreateItem if unset.

estimated_delivery_date

my $estimated_delivery_date = $basket->estimated_delivery_date;

Return the estimated delivery date for this basket.

It is calculated adding the delivery time of the vendor to the close date of this basket.

Return implicit undef if the basket is not closed, or the vendor does not have a delivery time.

late_since_days

my $number_of_days_late = $basket->late_since_days;

Return the number of days the basket is late.

Return implicit undef if the basket is not closed.

authorizer

my $authorizer = $basket->authorizer;

Returns the patron who authorized/created this basket.

is_closed

    if ( $basket->is_closed ) { ... }

Returns a boolean value representing if the basket is closed.

close

    $basket->close;

Close the basket and mark all open orders as ordered.

A Koha::Exceptions::Acquisition::Basket::AlreadyClosed exception is thrown if the basket is already closed.

to_api

    my $json = $basket->to_api;

Overloaded method that returns a JSON representation of the Koha::Acquisition::Basket object, suitable for API output.

to_api_mapping

This method returns the mapping for representing a Koha::Acquisition::Basket object on the API.

Internal methods

_type

AUTHOR

Aleisha Amohia <aleisha@catalyst.net.nz> Catalyst IT

<<