Table of Contents

Class Country

Namespace
Dynamicweb.Ecommerce.International
Assembly
Dynamicweb.Ecommerce.dll

Represents a country.

[Serializable]
public class Country : ICloneable
Inheritance
Country
Implements
Inherited Members

Constructors

Country()

Initializes a new instance of the class.

public Country()

Properties

AddressDisplayFormat

Gets or sets the display format

public string? AddressDisplayFormat { get; set; }

Property Value

string

AddressDisplayFormatMode

Gets or sets the display format mode

public AddressFormatMode AddressDisplayFormatMode { get; set; }

Property Value

AddressFormatMode

AddressEditFormat

Gets or sets the edit format

public string? AddressEditFormat { get; set; }

Property Value

string

AddressEditFormatMode

Gets or sets the edit format mode

public AddressFormatMode AddressEditFormatMode { get; set; }

Property Value

AddressFormatMode

Code2

Gets or sets the two-character code.

public required string Code2 { get; set; }

Property Value

string

Code3

Gets or sets the three-character code.

public string? Code3 { get; set; }

Property Value

string

CultureInfo

Gets or sets the culture information.

public string? CultureInfo { get; set; }

Property Value

string

CurrencyCode

Gets or sets the currency code.

public string? CurrencyCode { get; set; }

Property Value

string

Number

Gets or sets the number.

public int Number { get; set; }

Property Value

int

RegionCode

Gets or sets the region code.

public string RegionCode { get; set; }

Property Value

string

Regions

Gets or sets the regions.

public CountryCollection Regions { get; }

Property Value

CountryCollection

ReverseChargeForVat

Gets or sets a value indicating whether VAT is reverse charged in this country, so the buyer accounts for the VAT instead of the seller.

public bool ReverseChargeForVat { get; set; }

Property Value

bool

true if VAT is reverse charged in this country; otherwise, false.

Remarks

Only takes effect for orders in a reverse charge situation (ReverseChargeForVat), typically EU B2B sales. Prices are then calculated with 0% VAT and marked as reverse charged. For a product whose VAT group has a relation to this country, the relation's own reverse charge setting and VAT decide instead; this setting applies to products without such a relation and to prices without a product, such as the shipping fee and amount discounts.

ShippingVatFollowsGoods

Gets or sets a value indicating whether the VAT on shipping follows the VAT rates of the goods shipped.

public bool ShippingVatFollowsGoods { get; set; }

Property Value

bool

Remarks

When true, the shipping fee on orders with this VAT country has no VAT rate of its own: it is split across the VAT rates of the goods in the order, in proportion to each rate's goods value excluding VAT (e.g. Swedish VAT rules). When false, shipping is charged at the rate of the country.

Translations

Gets the translations for the current entity

public TranslationCollection<CountryTranslation> Translations { get; }

Property Value

TranslationCollection<CountryTranslation>

Vat

Gets or sets the VAT

public double Vat { get; set; }

Property Value

double

VatPostingGroup

Gets or sets the VAT Posting Group

public string? VatPostingGroup { get; set; }

Property Value

string

Methods

Clone()

Creates a new instance of a class with the same value as an existing instance.

public object Clone()

Returns

object

Remarks

Method performs a deep copy of all properties except the LanguageId property. LanguageId property always is set to Nothing.

GetDisplayAddress(CountryAddressInfo)

Gets the display address according to the address format information for specific country

public static List<string> GetDisplayAddress(CountryAddressInfo addressInfo)

Parameters

addressInfo CountryAddressInfo

Address information

Returns

List<string>

GetDisplayAddress(string)

Gets the display address according to the address format information for specific country

public static List<List<string>> GetDisplayAddress(string countryCode)

Parameters

countryCode string

2 letter country code

Returns

List<List<string>>

GetEditAddress(CountryAddressInfo)

Gets the edit address data according to the address format information for specific country

public static List<AddressFormatEditRow> GetEditAddress(CountryAddressInfo addressInfo)

Parameters

addressInfo CountryAddressInfo

Address information

Returns

List<AddressFormatEditRow>

GetEditAddress(string)

Gets the edit address data according to the address format information for specific country

public static List<List<string>> GetEditAddress(string countryCode)

Parameters

countryCode string

2 letter country code

Returns

List<List<string>>

GetName(string)

Gets the translated name in specified language

public string GetName(string languageId)

Parameters

languageId string

Returns

string

SetName(string, string)

Sets the translated name in specified language

public void SetName(string languageId, string name)

Parameters

languageId string
name string
To top