Skip to content

Commit

Permalink
[Bexley][WW] Implement direct debit fields for Agile calls
Browse files Browse the repository at this point in the history
  • Loading branch information
nephila-nacrea committed Feb 18, 2025
1 parent 3588198 commit adea981
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
8 changes: 5 additions & 3 deletions perllib/Open311/Endpoint/Integration/Agile.pm
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ sub _garden_subscription {
# Used for FMS report ID
ActionReference => $args->{attributes}{fixmystreet_id},

# TODO
DirectDebitDate => '',
DirectDebitReference => '',
DirectDebitDate => $args->{attributes}{direct_debit_start_date} // '',
DirectDebitReference => $args->{attributes}{direct_debit_reference} // '',
} );

# Expected response:
Expand Down Expand Up @@ -169,6 +168,9 @@ sub _garden_subscription_renew {
PaymentReference => $args->{attributes}{PaymentCode},
PaymentMethodCode =>
PAYMENT_METHOD_MAPPING->{ $args->{attributes}{payment_method} },

DirectDebitDate => $args->{attributes}{direct_debit_start_date} // '',
DirectDebitReference => $args->{attributes}{direct_debit_reference} // '',
} );

# Expected response:
Expand Down
17 changes: 17 additions & 0 deletions perllib/Open311/Endpoint/Service/UKCouncil/Agile.pm
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,23 @@ sub _build_attributes {
required => 0,
automated => 'hidden_field',
),

# For direct debit payments
Open311::Endpoint::Service::Attribute->new(
code => 'direct_debit_reference',
description => 'Direct debit reference',
datatype => 'string',
required => 0,
automated => 'hidden_field',
),
Open311::Endpoint::Service::Attribute->new(
code => 'direct_debit_start_date',
description => 'Direct debit initial payment date',
datatype => 'string',
required => 0,
automated => 'hidden_field',
),

);

return \@attributes;
Expand Down

0 comments on commit adea981

Please sign in to comment.