Added ProtectionType

This commit is contained in:
Joaquin Ossa 2024-12-04 14:36:49 +01:00
parent c8ee8bd456
commit 2a19f1d19a
6 changed files with 44 additions and 0 deletions

View file

@ -9,6 +9,7 @@ select
id_booking,
id_user_partner,
id_accommodation,
protection_type,
protection_basic_amount,
protection_extended_amount,
pet_protection,

View file

@ -30,6 +30,19 @@ models:
data_type: text
description: Identifier for the accommodation related to the booking.
- name: protection_type
data_type: text
description: Specific protection type for the request.
tests:
- not_null
- accepted_values:
values:
- "SCREEN & PROTECT"
- "BASIC PROTECTION"
- "STANDALONE PROTECTION"
- "DAMAGE WAIVER"
- "PET PROTECTION"
- name: protection_basic_amount
data_type: numeric
description: Basic protection amount for the booking.

View file

@ -30,6 +30,19 @@ models:
data_type: text
description: Identifier for the accommodation related to the booking.
- name: protection_type
data_type: text
description: Specific protection type for the request.
tests:
- not_null
- accepted_values:
values:
- "SCREEN & PROTECT"
- "BASIC PROTECTION"
- "STANDALONE PROTECTION"
- "DAMAGE WAIVER"
- "PET PROTECTION"
- name: protection_basic_amount
data_type: numeric
description: Basic protection amount for the booking.

View file

@ -9,6 +9,7 @@ select
id_booking as id_booking,
id_user_partner as id_user_partner,
id_accommodation as id_accommodation,
protection_type as protection_type,
protection_basic_amount as protection_basic_amount,
protection_extended_amount as protection_extended_amount,
pet_protection as pet_protection,

View file

@ -30,6 +30,19 @@ models:
data_type: text
description: Identifier for the accommodation related to the booking.
- name: protection_type
data_type: text
description: Specific protection type for the request.
tests:
- not_null
- accepted_values:
values:
- "SCREEN & PROTECT"
- "BASIC PROTECTION"
- "STANDALONE PROTECTION"
- "DAMAGE WAIVER"
- "PET PROTECTION"
- name: protection_basic_amount
data_type: numeric
description: Basic protection amount for the booking.

View file

@ -11,6 +11,9 @@ with
{{ adapter.quote("documents") }} ->> 'BookingId' as id_booking,
{{ adapter.quote("documents") }} ->> 'userId' as id_user_partner,
{{ adapter.quote("documents") }} ->> 'ListingId' as id_accommodation,
upper(
{{ adapter.quote("documents") }} ->> 'ProtectionType'
) as protection_type,
cast(
{{ adapter.quote("documents") }}
->> 'ProtectionBasicAmount' as decimal(19, 4)