diff --git a/perllib/FixMyStreet/Cobrand/Bexley.pm b/perllib/FixMyStreet/Cobrand/Bexley.pm index cc152f2ded8..e2296ec6c09 100644 --- a/perllib/FixMyStreet/Cobrand/Bexley.pm +++ b/perllib/FixMyStreet/Cobrand/Bexley.pm @@ -19,6 +19,7 @@ use Time::Piece; use DateTime; use Moo; with 'FixMyStreet::Roles::Open311Multi'; +with 'FixMyStreet::Cobrand::Bexley::Garden'; with 'FixMyStreet::Cobrand::Bexley::Waste'; sub council_area_id { 2494 } diff --git a/perllib/FixMyStreet/Cobrand/Bexley/Garden.pm b/perllib/FixMyStreet/Cobrand/Bexley/Garden.pm new file mode 100644 index 00000000000..049587d97c9 --- /dev/null +++ b/perllib/FixMyStreet/Cobrand/Bexley/Garden.pm @@ -0,0 +1,39 @@ +=head1 NAME + +FixMyStreet::Cobrand::Bexley::Garden - code specific to Bexley WasteWorks GGW + +=cut + +package FixMyStreet::Cobrand::Bexley::Garden; + +use Moo::Role; + +sub garden_service_name { 'garden waste collection service' } + +# TODO No current subscription look up here +# +sub garden_current_subscription { } + +=item * You can order a maximum of five bins + +=cut + +sub waste_garden_maximum { 5 } + +=item * Garden waste has different price for the first bin + +=cut + +sub garden_waste_cost_pa { + my ($self, $bin_count) = @_; + $bin_count ||= 1; + my $per_bin_cost = $self->garden_waste_subsequent_cost_pa; + my $first_cost = $self->garden_waste_first_cost_pa; + my $cost = $per_bin_cost * ($bin_count-1) + $first_cost; + return $cost; +} + +sub garden_waste_first_cost_pa { $_[0]->_get_cost('ggw_cost_first_cc') } # XXX DD +sub garden_waste_subsequent_cost_pa { $_[0]->_get_cost('ggw_cost_other') } + +1;