Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backfill CCJPA settlement status #3187

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions warehouse/models/docs/_docs_littlepay.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ The status of the settlement. Options are:
* `REJECTED`
* `SETTLED`
* `FAILED` - an error occurred during processing
This field was not added for all agencies until late November 2023, so
this field will be missing (null) for most rows before then.
{% enddocs %}

{% docs lp_request_created_timestamp_utc %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,16 @@ stg_littlepay__settlements AS (
acquirer,
refund_id,
acquirer_response_rrn,
settlement_status,
-- manual backfill of ccjpa data for specific reporting needs
-- information on how to backfill comes from manual LP extracts provided by Rebel
CASE
WHEN _key IN ("4e0bf943884f81fd6e524f4e175139c0", "910e0fe9c6f78de301b69f35798ec613", "8df624e5048128983c9693faaa32f27d", "67e002b1be3f07b2c06b4335364d7fde", "f658f3201463764ceea23816e9c27a54")
THEN "REJECTED"
WHEN participant_id = "ccjpa"
AND littlepay_export_date < "2023-11-28"
THEN "SETTLED"
ELSE settlement_status
END AS settlement_status,
request_created_timestamp_utc,
response_created_timestamp_utc,
_line_number,
Expand Down