Getting Delivery Address Settings

Tags: v8

The V8 API has introduced the ability to retrieve address settings for the correct operation of delivery creation.

To do this, a property AddressShowTypeSettings was added to the restaurant settings IRestaurant.

How to get the new delivery address settings:

IRestaurant restaurant = PluginContext.Operations.GetHostRestaurant();
AddressShowTypeSettings addressShowTypeSettings = restaurant.AddressShowTypeSettings;

The addressShowTypeSettings will have the following fields:

Address display types:

LEGACY - Address format with fields “City”, “Street”, “House”, “Building”

CITY - Address format with fields “Where to deliver” (Line1), “Entrance”, “Floor”, etc.

INTERNATIONAL - Address style in the United Kingdom with Line1 and Line2

NOPOSTCODE - Address style of the UAE.

This functionality may be useful for the plugin to understand whether it can use the fields Line1 and Line2 for creating the delivery address when creating a delivery on SyrveFront.