Skip to content

Commit

Permalink
fixup! [Bexley] Only show active GGW subs from Agile
Browse files Browse the repository at this point in the history
  • Loading branch information
davea committed Feb 18, 2025
1 parent 248310b commit c1683af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions perllib/FixMyStreet/Cobrand/Bexley/Garden.pm
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ sub lookup_subscription_for_uprn {

my $results = $self->agile->CustomerSearch($uprn);

Check warning on line 50 in perllib/FixMyStreet/Cobrand/Bexley/Garden.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Bexley/Garden.pm#L50

Added line #L50 was not covered by tests

# find the first 'ACTIVATED' Customer with an 'ACTIVE' contract
# find the first 'ACTIVATED' Customer with an 'ACTIVE'/'PRECONTRACT' contract
my $customers = $results->{Customers} || [];
OUTER: for ( @$customers ) {

Check warning on line 54 in perllib/FixMyStreet/Cobrand/Bexley/Garden.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Bexley/Garden.pm#L53-L54

Added lines #L53 - L54 were not covered by tests
next unless $_->{CustomertStatus} eq 'ACTIVATED'; # CustomertStatus (sic) options seem to be ACTIVATED/INACTIVE
my $contracts = $_->{ServiceContracts} || [];

Check warning on line 56 in perllib/FixMyStreet/Cobrand/Bexley/Garden.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Bexley/Garden.pm#L56

Added line #L56 was not covered by tests
next unless $contracts;
$customer = $_;
for ( @$contracts ) {

Check warning on line 59 in perllib/FixMyStreet/Cobrand/Bexley/Garden.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Bexley/Garden.pm#L58-L59

Added lines #L58 - L59 were not covered by tests
next unless $_->{ServiceContractStatus} eq 'ACTIVE'; # Options seem to be ACTIVE/NOACTIVE
next unless $_->{ServiceContractStatus} =~ /(ACTIVE|PRECONTRACT)/; # Options seem to be ACTIVE/NOACTIVE/PRECONTRACT
$contract = $_;

Check warning on line 61 in perllib/FixMyStreet/Cobrand/Bexley/Garden.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Bexley/Garden.pm#L61

Added line #L61 was not covered by tests
# use the first matching customer/contract
last OUTER if $customer && $contract;
Expand Down

0 comments on commit c1683af

Please sign in to comment.