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
BusinessSector
The business sector for this client.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public BusinessSector? BusinessSector { get; set; }
Property Value
Capital
The social capital of the company.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public decimal? Capital { get; set; }
Property Value
CashRegister
Information about the cash register.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public CashRegister CashRegister { get; set; }
Property Value
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
CompanyBusinessIdenticationNumber
The business identification number of the company
public string CompanyBusinessIdenticationNumber { get; }
Property Value
CompanyIdentification
The company identification.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public CompanyIdentification[] CompanyIdentification { get; set; }
Property Value
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
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
CompanyParameter
Additional parameters for the company.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<ConfigurationParameter> CompanyParameter { get; set; }
Property Value
CompanyTaxNumber
The tax number of the company
public string CompanyTaxNumber { get; }
Property Value
CompanyVatNumber
The vat number of the company
public string CompanyVatNumber { get; }
Property Value
DecommissionedDate
Date of decommissioning for current terminal
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DateTimeOffset? DecommissionedDate { get; set; }
Property Value
DigitalReceipt
Configuration object for digital receipt branding.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DigitalReceipt DigitalReceipt { get; set; }
Property Value
DistributerId
The distributor id for the license for the fiscal client.
public Guid DistributerId { get; set; }
Property Value
DistributorParameter
Additional parameters for the distributor.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<ConfigurationParameter> DistributorParameter { get; set; }
Property Value
Firstname
Firstname
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string? Firstname { get; set; }
Property Value
FiscalClientState
Fiscal client state
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public FiscalClientState FiscalClientState { get; }
Property Value
FiscalCountry
The fiscal country for the fiscal implementation.
[Required]
public FiscalCountry FiscalCountry { get; set; }
Property Value
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
FiscalRegion
If necessary the fiscal region for the country (eg. Spain or Canada).
public string FiscalRegion { get; set; }
Property Value
FiscalYearStartMonth
The month of the start of the fiscal year.
public int FiscalYearStartMonth { get; set; }
Property Value
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
InitializationDate
Date of initialization for current terminal
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DateTimeOffset? InitializationDate { get; set; }
Property Value
IotAccessKey
Represents the encoded accessKey for Iot
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string IotAccessKey { get; set; }
Property Value
IsLegalPerson
IsLegalPerson (default value because of backward compatibility is always true)
public bool IsLegalPerson { get; set; }
Property Value
Lastname
Lastname
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string? Lastname { get; set; }
Property Value
LegalForm
The legal form of the company.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string LegalForm { get; set; }
Property Value
LicenseConsumerId
The licence consumer (buyer) of the license for this fiscal client.
public Guid LicenseConsumerId { get; set; }
Property Value
LicenseKey
The license key (jwt) for the client.
public string LicenseKey { get; set; }
Property Value
MovedToCloud
Represents if the client was moved to cloud
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public bool MovedToCloud { get; set; }
Property Value
NamePrefix
Name prefix
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string? NamePrefix { get; set; }
Property Value
NameSuffix
Name suffix
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string? NameSuffix { get; set; }
Property Value
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
Remarks
Not used with cloud fiscalisation.
Salutation
Salutation
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public Salutation? Salutation { get; set; }
Property Value
SimpleCashPointClosing
True if the fiscal module supports simple cashpoint closing (end of day); Otherwise false.
public bool SimpleCashPointClosing { get; set; }
Property Value
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
StoreName
The name of the store.
public string StoreName { get; set; }
Property Value
StoreNumber
The identification (number or string) of the store.
[Required]
public string StoreNumber { get; set; }
Property Value
StoreOpeningDate
The opening date of the store.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DateTime? StoreOpeningDate { get; set; }
Property Value
StoreParameter
Additional parameters for the store.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<ConfigurationParameter> StoreParameter { get; set; }
Property Value
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
TerminalParameter
Additional parameters for terminal.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<ConfigurationParameter> TerminalParameter { get; set; }
Property Value
TestClient
True if this client is a test client; otherwise false.
public bool TestClient { get; set; }
Property Value
Title
Title
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string? Title { get; set; }
Property Value
UniqueClientId
Represents the unique client id of the fiscal client.
[Required]
public Guid UniqueClientId { get; set; }
Property Value
UsedVersion
Returns the sw-version which is actually used by the client.
public string UsedVersion { get; set; }
Property Value
WebAddress
WebAddress
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string? WebAddress { get; set; }
Property Value
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
otherFiscalClientThe 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
parameterNamestringThe name of the parameter.
defaultValuestringThe 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
parameterNamestringThe name of the requested parameter.
defaultValuestringThe 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
parameterNamestringThe name of the requested parameter.
defaultValuestringThe 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
oldFiscalClientFiscalClientThe 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
oldFiscalClientis set to null.
ToString()
Returns the client as string representation.
public override string ToString()
Returns
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
recursiveboolTrue 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
recursiveboolTrue if sub objects should also be checked; otherwise false. Always interpreted as false.
isNewClientboolTrue 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.