Table of Contents

Class DocumentReference

Namespace
RetailForce.Fiscalisation.Model.Document
Assembly
RetailForce.Fiscalisation.Model.dll

A document reference used for referencing other documents (when canceling, linking, etc.).

[Serializable]
public class DocumentReference : DocumentValidationBase, IEquatable<DocumentReference>
Inheritance
ValidationBase<DocumentValidationError>
ValidationPropertyBase<DocumentValidationError>
DocumentReference
Implements
Derived
Inherited Members
ValidationPropertyBase<DocumentValidationError>.Validate()

Properties

DocumentBookDate

The storage date of the referenced document.

public DateTimeOffset DocumentBookDate { get; set; }

Property Value

DateTimeOffset

Remarks

The format for this property is according ISO 8601 including time zone information. Sample: 2013-01-21T00:00:00+01:00. If time zone is omitted, time zone is interpreted in the local setting of the executing environment.

DocumentGuid

The document guid of the referenced document.

public Guid DocumentGuid { get; set; }

Property Value

Guid

Remarks

Either the DocumentGuid or the complete document key (StoreNumber, TerminalNumber, DocumentType and DocumentNumber/FiscalDocumentNumber) must be set.
If you want to mark documents in digital receipt with process id (also the cancelled document) only DocumentGuid will work for referencing.

DocumentId

The unique identification of the document.

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

Property Value

string

Remarks

Should be continuous and unique identification of all documents. required, max length = 40.

DocumentLevel

The level for the document.

protected override DocumentLevel DocumentLevel { get; }

Property Value

DocumentLevel

DocumentNumber

The document number of the referenced document.

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

Property Value

string

DocumentNumberSeries

The document number series of the referenced document.

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

Property Value

string

DocumentType

The type of the referenced document.

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

Property Value

DocumentType?

FiscalDocumentNumber

The fiscal document number of the referenced document.

[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public int FiscalDocumentNumber { get; set; }

Property Value

int

Remarks

Either the DocumentNumber or the FiscalDocumentNumber must be set (when not using DocumentGuid).

ReferenceType

The type of the reference.

public ReferenceType ReferenceType { get; set; }

Property Value

ReferenceType

ReturnReasonText

The reason (description) for the return / cancellation.

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

Property Value

string

ReturnReasonType

The reason for the return / cancellation (if ReferenceType is cancellation).

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

Property Value

ReturnReasonType?

StoreNumber

The store number of the referenced document.

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

Property Value

string

TerminalNumber

The terminal number of the referenced document.

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

Property Value

string

Methods

Equals(DocumentReference)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(DocumentReference other)

Parameters

other DocumentReference

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

ValidateElement()

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

protected override List<DocumentValidationError> ValidateElement()

Returns

List<DocumentValidationError>

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