data-dwh-dbt-project/models
Pablo Martín 86719b6a10 Merged PR 3371: Update Host takes risk waivers logic
# Description

This PR originally started with the intent of modifying the applicable logic for waivers where the host takes the risk (in order to follow the [current state of this specification](https://www.notion.so/knowyourguest-superhog/Guest-Services-Taxes-How-to-calculate-a5ab4c049d61427fafab669dbbffb3a2?pvs=4)).

The verification payments model was quite convoluted already: adding this logic was turning it into an unmanageable ball of hair. So I broke the rules and refactored in the same PR. The end result is that:
- The model implementation has changed quite a bit.
- Behavior for everything but host-takes-risk waivers should remain unchanged.
- Behaviour for host-takes-risk waivers should have changed.

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #20043
2024-10-30 10:16:16 +00:00
..
intermediate Merged PR 3371: Update Host takes risk waivers logic 2024-10-30 10:16:16 +00:00
reporting Merged PR 3290: Update exposure of top losers - now account managers overview 2024-10-22 14:14:58 +00:00
staging Merged PR 3207: Cast as dates and timestamps for hubspot deals in staging 2024-10-16 14:57:36 +00:00
doc_blocks.md improve stg_stripe__charges 2024-02-23 16:45:19 +01:00