Merged PR 3089: Remove custom pricing/protection
# Description This PR aims to remove custom pricing/protection fields for New Pricing. After discussing with Clay, custom pricing/protected amounts are not allowed in New Pricing. This user-specific changes might be applied in the form of discounts, but these are not defined/implemented yet. There were some fields created in the New Pricing tables that were considering the custom possibility, and Gus confirm that these will come as Null. So I prefer to delete them now, have clean code, and if in X months dev team wants to remove these, we should be good. # 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. - [NA] I have checked for DRY opportunities with other models and docs. - [NA] 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: #20809
This commit is contained in:
parent
ea8972a91b
commit
b70f426f8e
4 changed files with 3 additions and 31 deletions
|
|
@ -586,10 +586,9 @@ models:
|
|||
- Payment types (amount, percentage)
|
||||
- Price computation methods (per booking, per night)
|
||||
- Charging methods (post checkout, pre booking, at waiver payment, etc.)
|
||||
Additionally, it's possible that a price is modified at user level. This is identifiable
|
||||
by the id_user_product_bundle being set (custom price) vs. not set (default price).
|
||||
Each product service and currency line can be active in a given time frame, and this table
|
||||
also contains the history of previous, currently inactive, product services prices.
|
||||
Lastly, custom pricing per user is not possible.
|
||||
|
||||
tests:
|
||||
- dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B:
|
||||
|
|
@ -652,12 +651,6 @@ models:
|
|||
- "AT WAIVER PAYMENT"
|
||||
- "AT DEPOSIT PAYMENT"
|
||||
- "N/A"
|
||||
- name: id_user_product_bundle
|
||||
data_type: integer
|
||||
description: |
|
||||
Identifier of the user product bundle in which this product service to price
|
||||
is applied. It can be null, thus referring to a product bundle per user that
|
||||
uses a default price.
|
||||
- name: amount_local_curr
|
||||
data_type: decimal
|
||||
description: |
|
||||
|
|
@ -786,10 +779,9 @@ models:
|
|||
- Payment types (amount, percentage)
|
||||
- Price computation methods (per booking, per night)
|
||||
- Charging methods (post checkout, pre booking, at waiver payment, etc.)
|
||||
Additionally, it's possible that a price is modified at user level. This is identifiable
|
||||
by the id_user_product_bundle being set (custom price) vs. not set (default price).
|
||||
Each protection plan and currency line can be active in a given time frame, and this table
|
||||
also contains the history of previous, currently inactive, protection plan prices.
|
||||
Lastly, custom pricing per user is not allowed.
|
||||
|
||||
tests:
|
||||
- dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B:
|
||||
|
|
@ -852,12 +844,6 @@ models:
|
|||
- "AT WAIVER PAYMENT"
|
||||
- "AT DEPOSIT PAYMENT"
|
||||
- "N/A"
|
||||
- name: id_user_product_bundle
|
||||
data_type: integer
|
||||
description: |
|
||||
Identifier of the user product bundle in which this protection plan to price
|
||||
is applied. It can be null, thus referring to a product bundle per user that
|
||||
uses a default price.
|
||||
- name: amount_local_curr
|
||||
data_type: decimal
|
||||
description: |
|
||||
|
|
@ -911,8 +897,7 @@ models:
|
|||
Contains the relationship "this protection plan can protect these amounts in this currency"
|
||||
in the scope of New Pricing. It accounts for the cover, i.e., how much we protect, rather than
|
||||
the price of the protection service.
|
||||
It's possible that a price is modified at user level. This is identifiable
|
||||
by the id_user_host being set (custom price) vs. not set (default price).
|
||||
Lastly, custom amounts protected per user are not possible.
|
||||
|
||||
columns:
|
||||
- name: id_protection_plan_cover
|
||||
|
|
@ -934,11 +919,6 @@ models:
|
|||
Identifier of the currency.
|
||||
tests:
|
||||
- not_null
|
||||
- name: id_user_host
|
||||
data_type: string
|
||||
description: |
|
||||
Identifier of the user. It can be null, thus referring to a protection
|
||||
cover that uses a default amount.
|
||||
- name: baseline_protection_cover_local_curr
|
||||
data_type: decimal
|
||||
description: |
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ with
|
|||
{{ adapter.quote("BillingMethodId") }} as id_price_base_unit,
|
||||
{{ adapter.quote("InvoicingMethodId") }} as id_invoicing_trigger,
|
||||
|
||||
{{ adapter.quote("UserProductBundleId") }} as id_user_product_bundle,
|
||||
|
||||
{{ adapter.quote("Amount") }} as amount_local_curr,
|
||||
{{ adapter.quote("DisplayName") }} as product_service_price_name,
|
||||
|
||||
|
|
@ -56,7 +54,6 @@ select
|
|||
pt.payment_type,
|
||||
pcm.price_base_unit,
|
||||
cm.invoicing_trigger,
|
||||
pstp.id_user_product_bundle,
|
||||
pstp.amount_local_curr,
|
||||
pstp.product_service_price_name,
|
||||
pstp.starts_at_utc,
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ with
|
|||
{{ adapter.quote("ProtectionPlanId") }} as id_protection_plan,
|
||||
{{ adapter.quote("CurrencyId") }} as id_currency,
|
||||
|
||||
{{ adapter.quote("SuperhogUserId") }} as id_user_host,
|
||||
|
||||
{{ adapter.quote("DisplayName") }} as protection_plan_cover_name,
|
||||
|
||||
{{ adapter.quote("BaselineProtection") }}
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ with
|
|||
{{ adapter.quote("BillingMethodId") }} as id_price_base_unit,
|
||||
{{ adapter.quote("InvoicingMethodId") }} as id_invoicing_trigger,
|
||||
|
||||
{{ adapter.quote("UserProductBundleId") }} as id_user_product_bundle,
|
||||
|
||||
{{ adapter.quote("Amount") }} as amount_local_curr,
|
||||
{{ adapter.quote("DisplayName") }} as protection_plan_price_name,
|
||||
|
||||
|
|
@ -56,7 +54,6 @@ select
|
|||
pt.payment_type,
|
||||
pcm.price_base_unit,
|
||||
cm.invoicing_trigger,
|
||||
pstp.id_user_product_bundle,
|
||||
pstp.amount_local_curr,
|
||||
pstp.protection_plan_price_name,
|
||||
pstp.starts_at_utc,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue