use parent 'SL::DB::Object';
use Rose::Object::MakeMethods::Generic (
scalar => [ qw(discount description spec price_source invalid missing) ],
+ 'scalar --get_set_init' => [ qw(priority) ],
);
require SL::DB::Helper::Attr;
"source: @{[ $_[0]->source ]}, discount: @{[ $_[0]->discount ]}, description: @{[ $_[0]->description ]}"
}
+sub init_priority {
+ 3
+}
+
1;
__END__
=head1 NAME
-SL::PriceSource::Discount - contrainer to pass calculated discounts around
+SL::PriceSource::Discount - container to pass calculated discounts around
=head1 SYNOPSIS
);
# invalid discount
- SL::PriceSource::Dicount->new(
+ SL::PriceSource::Discount->new(
discount => $original_discount,
spec => $original_spec,
description => $original_description,
A ref to the creating algorithm.
+=item C<priority>
+
+OPTIONAL. Discounts may supply a numerical priority. Higher will trump over lower, even when
+supplying lower discounts. Defaults to 3 (as in middle of 1-5).
+
=item C<missing>
OPTIONAL. Both indicator and localized message that the discount with this spec