# Metapolicy_struct

URL: https://docs.api.ostrovok.ru/docs/how-tos/process-fields/metapolicy-struct/

Tags: how-tos

---


> [!NOTE]
> На этой странице показано, как отображать объект `metapolicy_struct` в Node.js и Python.



Прочтите дамп построчно и найдите необходимый отель.
   1. Прочитайте объекты.
   2. При необходимости измените значения.
   3. Учитывайте, что объекты могут быть `null` или пустыми — обрабатывайте такие случаи.
   4. Покажите значения пользователю. Например, используйте такие строки:
      * `deposit` — данные о депозите.
         
         **Node.js**

```js {linenos=inline}
console.log('Deposit is %s to have. %s %s %s The price is %s %s %s.',
  deposit.availability, deposit.type, deposit.payment_type, deposit.pricing_method, deposit.price, deposit.currency, deposit.price_unit);
```

         **Python**

```python
print(f"Deposit is {deposit.availability} to have." +
         f" {deposit.type} {deposit.payment_type} {deposit.pricing_method}" +
         f" The price is {deposit.price} {deposit.currency} {deposit.price_unit}."
)
```

         

      * `internet` — наличие интернета в отеле и правила использования.
         
         **Node.js**

```js {linenos=inline}
console.log('%s is %s to the overall price. The price is %s %s %s. %s.',
  internet.type, internet.inclusion, internet.price, internet.currency, internet.price_unit, internet.work_area);
```

         **Python**

```python
print(f"{internet.type} is {internet.inclusion} to the overall price. " +
         f"The price is {internet.price} {internet.currency} {internet.price_unit}. {internet.work_area}."
)
```

         

      * `meal` — информация о предоставляемом питании для взрослых.
         
         **Node.js**

```js {linenos=inline}
console.log('%s is %s to the overall price. The price is %s %s per a person.',
  meal.type, meal.inclusion, meal.price, meal.currency);
```

         **Python**

```python
print(f"{meal.type} is {meal.inclusion} to the overall price. " +
         f"The price is {meal.price} {meal.currency} per a person."
)
```

         

      * `children_meal` — информация о предоставляемом питании для детей.
         
         **Node.js**

```js {linenos=inline}
console.log('%s is %s to the overall price. For children of %s–%s y.o. The price is %s %s per a child.',
 children_meal.type, children_meal.inclusion, children_meal.age_start, children_meal.age_end, children_meal.price, children_meal.currency);
```

         **Python**

```python
print(f"{children_meal.type} is {children_meal.inclusion} to the overall price. " +
         f"For children of {children_meal.age_start}–{children_meal.age_end} y.o." +
         f" The price is {children_meal.price} {children_meal.currency} per a child."
)
```

         

      * `extra_bed` — правила предоставления дополнительных кроватей для взрослых.
         
         **Node.js**

```js {linenos=inline}
console.log('%s bed(s). %s to the overall price. The price is %s %s %s.',
  extra_bed.amount, extra_bed.inclusion, extra_bed.price, extra_bed.currency, extra_bed.price_unit);
```

         **Python**

```python
print(f"{extra_bed.amount} bed(s). {extra_bed.inclusion} to the overall price. " +
         f"The price is {extra_bed.price} {extra_bed.currency} {extra_bed.price_unit}."
)
```

         

      * `cot` — правила в отношении детских кроваток.
         
         **Node.js**

```js {linenos=inline}
console.log('%s cot(s). %s to the overall price. The price is %s %s %s.',
  cot.amount, cot.inclusion, cot.price, cot.currency, cot.price_unit);
```

         **Python**

```python
print(f"{cot.amount} cot(s). {cot.inclusion} to the overall price. " +
         f"The price is {cot.price} {cot.currency} {cot.price_unit}."
)
```

         

      * `pets` — правила размещения с животными.
         
         **Node.js**

```js {linenos=inline}
console.log('Pet weight is %s is %s to the overall price. The price is %s %s %s.',
  pets.pets_type, pets.inclusion, pets.price, pets.currency, pets.price_unit);
```

         **Python**

```python
print(f"Pet weight is {pets.pets_type} is {pets.inclusion} to the overall price. " +
         f"The price is {pets.price} {pets.currency} {pets.price_unit}."
)
```

         

      * `shuttle` — правила предоставления трансферов.
         
         **Node.js**

```js {linenos=inline}
console.log('Shuttle is %s to %s. %s to the overall price. The price is %s %s.',
  shuttle.shuttle_type, shuttle.destination_type, shuttle.inclusion, shuttle.price, shuttle.currency);
```

         **Python**

```python
print(f"Shuttle is {shuttle.shuttle_type} to {shuttle.destination_type}. " +
         f"{shuttle.inclusion} to the overall price. " +
         f"The price is {shuttle.price} {shuttle.currency}."
)
```

         

      * `parking` — информация о парковке.
         
         **Node.js**

```js {linenos=inline}
console.log('Parking is %s and %s to the overall price. The price is %s %s %s.',
  parking.territory_type, parking.inclusion, parking.price, parking.currency, parking.price_unit);
```

         **Python**

```python
print(f"Parking is {parking.territory_type} and {parking.inclusion} to the overall price. " +
       f"The price is {parking.price} {parking.currency} {parking.price_unit}."
)
```

         

      * `children` — политика предоставления дополнительных кроватей для детей.
         
         **Node.js**

```js {linenos=inline}
console.log('Bed for a child is %s. For children of %s–%s y.o. The price is %s %s.',
   children.extra_bed, children.age_start, children.age_end, children.price, children.currency);
```

         **Python**

```python
print(f"Bed for a child is {children.extra_bed}. " +
         f"For children of {children.age_start}–{children.age_end} y.o. " +
         f"The price is {children.price} {children.currency}."
)
```

         

      * `visa` — информация о визовой поддержке.
         
         **Node.js**

```js {linenos=inline}
console.log('Visa support for the embassy is %s.',
  visa.visa_support);
```

         **Python**

```python
print(f"Visa support for the embassy is {visa.visa_support}.")
```

         

      * `no_show` — политика в случае незаезда.
         
         **Node.js**

```js {linenos=inline}
console.log('No-show is %s to have %s at %s.',
  no_show.availability, no_show.day_period, no_show.time);
```

         **Python**

```python
print(f"No-show is {no_show.availability} to have {
   no_show.day_period} at {no_show.time}."
)
```

         

      * `add_fee` — дополнительные услуги, сборы и налоги.
         
         **Node.js**

```js {linenos=inline}
console.log('Additional service is for %s. The price is %s %s %s.',
  add_fee.fee_type, add_fee.price, add_fee.currency, add_fee.price_unit);
```

         **Python**

```python
print(f"Additional service is for {add_fee.fee_type}. " +
         f"The price is {add_fee.price} {add_fee.currency} {add_fee.price_unit}."
)
```

         

      * `check_in_check_out` — правила заезда и выезда.
         
         **Node.js**

```js {linenos=inline}
console.log('%s is %s to the overall price. The price is %s %s.',
  check_in_check_out.check_in_check_out_type, check_in_check_out.inclusion, check_in_check_out.price, check_in_check_out.currency);
```

         **Python**

```python
print(f"{check_in_check_out.check_in_check_out_type} is {check_in_check_out.inclusion} to the overall price." +
         f" The price is {check_in_check_out.price} {check_in_check_out.currency}."
)
```

         


