Table of Contents

Class FiscalClient

Namespace
RetailForce.Fiscalisation.Configuration
Assembly
RetailForce.Fiscalisation.Model.dll

Represents a single fiscal client (representation of a cash register)

public class FiscalClient : ConfigurationValidationBase, IEquatable<FiscalClient>
Inheritance
ValidationBase<ValidationError>
ValidationPropertyBase<ValidationError>
FiscalClient
Implements
Inherited Members
ValidationPropertyBase<ValidationError>.Validate()

Properties

Birthdate

Birthdate

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DateTimeOffset? Birthdate { get; set; }

Property Value

DateTimeOffset?

BusinessSector

The business sector for this client.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public BusinessSector? BusinessSector { get; set; }

Property Value

BusinessSector?

Capital

The social capital of the company.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public decimal? Capital { get; set; }

Property Value

decimal?

CashRegister

Information about the cash register.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public CashRegister CashRegister { get; set; }

Property Value

CashRegister

CompanyAddress

The address of the company (not the address of the store, except they are the same).

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public Address CompanyAddress { get; set; }

Property Value

Address

CompanyBusinessIdenticationNumber

The business identification number of the company

public string CompanyBusinessIdenticationNumber { get; }

Property Value

string

CompanyIdentification

The company identification.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public CompanyIdentification[] CompanyIdentification { get; set; }

Property Value

CompanyIdentification[]

Remarks

For germany at least taxnumber and vatnumber must be set.

CompanyName

The name of the company.

[Required]
public string CompanyName { get; set; }

Property Value

string

Remarks

It is necessary that this is the correct name according to country specific law.

CompanyNumber

The number of an applicable company (for instance brand) of the client.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string CompanyNumber { get; set; }

Property Value

string

CompanyParameter

Additional parameters for the company.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<ConfigurationParameter> CompanyParameter { get; set; }

Property Value

List<ConfigurationParameter>

CompanyTaxNumber

The tax number of the company

public string CompanyTaxNumber { get; }

Property Value

string

CompanyVatNumber

The vat number of the company

public string CompanyVatNumber { get; }

Property Value

string

DecommissionedDate

Date of decommissioning for current terminal

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DateTimeOffset? DecommissionedDate { get; set; }

Property Value

DateTimeOffset?

DigitalReceipt

Configuration object for digital receipt branding.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DigitalReceipt DigitalReceipt { get; set; }

Property Value

DigitalReceipt

DistributerId

The distributor id for the license for the fiscal client.

public Guid DistributerId { get; set; }

Property Value

Guid

DistributorParameter

Additional parameters for the distributor.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<ConfigurationParameter> DistributorParameter { get; set; }

Property Value

List<ConfigurationParameter>

Firstname

Firstname

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string? Firstname { get; set; }

Property Value

string

FiscalClientState

Fiscal client state

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public FiscalClientState FiscalClientState { get; }

Property Value

FiscalClientState

FiscalCountry

The fiscal country for the fiscal implementation.

[Required]
public FiscalCountry FiscalCountry { get; set; }

Property Value

FiscalCountry

Remarks

Possible values at the moment are:

  • Germany

FiscalModulImplementationConfiguration

The configuration for the country specific implementation.

[Required]
[JsonConverter(typeof(ClientConfigurationJsonConverter))]
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public IFiscalImplementationConfiguration FiscalModulImplementationConfiguration { get; set; }

Property Value

IFiscalImplementationConfiguration

FiscalRegion

If necessary the fiscal region for the country (eg. Spain or Canada).

public string FiscalRegion { get; set; }

Property Value

string

FiscalYearStartMonth

The month of the start of the fiscal year.

public int FiscalYearStartMonth { get; set; }

Property Value

int

GlobalShortId

Represents a 4 digit (alphanumeric, case-sensitive) value representing a global unique short id for the terminal.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string GlobalShortId { get; set; }

Property Value

string

InitializationDate

Date of initialization for current terminal

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DateTimeOffset? InitializationDate { get; set; }

Property Value

DateTimeOffset?

IotAccessKey

Represents the encoded accessKey for Iot

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string IotAccessKey { get; set; }

Property Value

string

IsLegalPerson

IsLegalPerson (default value because of backward compatibility is always true)

public bool IsLegalPerson { get; set; }

Property Value

bool

Lastname

Lastname

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string? Lastname { get; set; }

Property Value

string

LegalForm

The legal form of the company.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string LegalForm { get; set; }

Property Value

string

LicenseConsumerId

The licence consumer (buyer) of the license for this fiscal client.

public Guid LicenseConsumerId { get; set; }

Property Value

Guid

LicenseKey

The license key (jwt) for the client.

public string LicenseKey { get; set; }

Property Value

string

MovedToCloud

Represents if the client was moved to cloud

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public bool MovedToCloud { get; set; }

Property Value

bool

NamePrefix

Name prefix

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string? NamePrefix { get; set; }

Property Value

string

NameSuffix

Name suffix

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string? NameSuffix { get; set; }

Property Value

string

PersonLegalForm

Legal Form for LegalPerson (value is the id from FiscalCountryProperties.LegalForms.Id)

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public int? PersonLegalForm { get; set; }

Property Value

int?

PlatformType

The platform where this client is running.

public PlatformType? PlatformType { get; set; }

Property Value

PlatformType?

Remarks

Not used with cloud fiscalisation.

Salutation

Salutation

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public Salutation? Salutation { get; set; }

Property Value

Salutation?

SimpleCashPointClosing

True if the fiscal module supports simple cashpoint closing (end of day); Otherwise false.

public bool SimpleCashPointClosing { get; set; }

Property Value

bool

Remarks

In this case calculation of payments during a day will be done.

StoreAddress

The address of the store where the cash register resides.

public Address StoreAddress { get; set; }

Property Value

Address

StoreName

The name of the store.

public string StoreName { get; set; }

Property Value

string

StoreNumber

The identification (number or string) of the store.

[Required]
public string StoreNumber { get; set; }

Property Value

string

StoreOpeningDate

The opening date of the store.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DateTime? StoreOpeningDate { get; set; }

Property Value

DateTime?

StoreParameter

Additional parameters for the store.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<ConfigurationParameter> StoreParameter { get; set; }

Property Value

List<ConfigurationParameter>

TerminalNumber

The terminal number of the cash register (if there are more than one terminal at one store).

[Required]
public string TerminalNumber { get; set; }

Property Value

string

TerminalParameter

Additional parameters for terminal.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<ConfigurationParameter> TerminalParameter { get; set; }

Property Value

List<ConfigurationParameter>

TestClient

True if this client is a test client; otherwise false.

public bool TestClient { get; set; }

Property Value

bool

Title

Title

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string? Title { get; set; }

Property Value

string

UniqueClientId

Represents the unique client id of the fiscal client.

[Required]
public Guid UniqueClientId { get; set; }

Property Value

Guid

UsedVersion

Returns the sw-version which is actually used by the client.

public string UsedVersion { get; set; }

Property Value

string

WebAddress

WebAddress

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string? WebAddress { get; set; }

Property Value

string

Methods

Encrypt()

Encrypts sensitive data on the client.

public void Encrypt()

EncryptParametersForClientTransmission()

Encrypts all entity parameters which are flagged with encrypted with client encrypted secret Can only be used in cloud (parameter encrypted is not available on the client)

public void EncryptParametersForClientTransmission()

Equals(FiscalClient)

Returns wether the given object euqals the current object or not.

public bool Equals(FiscalClient other)

Parameters

other FiscalClient

The object to compare.

Returns

bool

True if the given FiscalClient has the same UniqueClientId than the current object.

GetParameter(string, string)

Get parameter from client with inheritance.

public string GetParameter(string parameterName, string defaultValue = null)

Parameters

parameterName string

The name of the parameter.

defaultValue string

The default value if not found. Optional.

Returns

string

The parameter value.

Remarks

Inheritance path: Distributor -> Company -> Store -> Terminal

GetStoreParameter(string, string)

Returns the requested store parameter.

public string GetStoreParameter(string parameterName, string defaultValue = null)

Parameters

parameterName string

The name of the requested parameter.

defaultValue string

The default value if the parameter is not found. Can be null.

Returns

string

The value of the requested parameter.

GetTerminalParameter(string, string)

Returns the requested terminal parameter.

public string GetTerminalParameter(string parameterName, string defaultValue = null)

Parameters

parameterName string

The name of the requested parameter.

defaultValue string

The default value if the parameter is not found. Can be null.

Returns

string

The value of the requested parameter.

PreserveValues(FiscalClient)

If necessary this method is called to preserve configuration values when updating the configuration.

public void PreserveValues(FiscalClient oldFiscalClient)

Parameters

oldFiscalClient FiscalClient

The old fiscal client holding the values which should be preserved.

Remarks

Implement this method if you want to preserve data in the configuration which would be updated by the cloud (initialization date, etc.)

Exceptions

ArgumentNullException

Thrown if parameter oldFiscalClient is set to null.

ToString()

Returns the client as string representation.

public override string ToString()

Returns

string

Validate(bool)

Validates the fiscal client and returns a list of RetailForce.Common.Validation.ValidationError objects.

public override List<ValidationError> Validate(bool recursive = false)

Parameters

recursive bool

True if sub objects should also be checked; otherwise false. Always interpreted as false.

Returns

List<ValidationError>

A list of RetailForce.Common.Validation.ValidationError objects.

Remarks

Validates also country specific validation (internal call to ValidateClient(FiscalClient, bool)).

Validate(bool, bool)

Validates the fiscal client and returns a list of RetailForce.Common.Validation.ValidationError objects.

public List<ValidationError> Validate(bool recursive = false, bool isNewClient = false)

Parameters

recursive bool

True if sub objects should also be checked; otherwise false. Always interpreted as false.

isNewClient bool

True if client is a new client which is generated so far (check for cloud portal); Default is false.

Returns

List<ValidationError>

A list of RetailForce.Common.Validation.ValidationError objects.

Remarks

Validates also country specific validation (internal call to ValidateClient(FiscalClient, bool)).
Please be sure to set isNewClient only in environment where client will be created and not in standard validation of transaction processing.

ValidateElement()

Validates the element with element specific validation and returns a list of validation errors.

protected override List<ValidationError> ValidateElement()

Returns

List<ValidationError>

A list of RetailForce.Common.Validation.ValidationError objects.