Services APIΒΆ
Shuup provides a service API which is based on polymorphic models.
Currently Shuup provides two implementations of these services: payment
methods
and shipping methods
, but the API allows implementing
other kind of services too.
From the Services API point of view a service
is something that may conditionally
generate some new lines
for a
basket. Also various aspects of these services can be customized:
Availability
of the service for certain basketCosts
of the service for certain basketEffective name
of the service for certain basket
Each service should have a service provider
and service choice
, which is selected from a list of
service choices specified by the service provider.
Behavior of a service can be customized with behavior components
. Each behavior component
may limit availability of the service, or (conditionally) add costs to
it, or affect service delivery time (which in case of shipping methods
is the shipping time, but could have other meaning for other kinds of
services). It is possible to assign several behavior components to a
service.