Class DocumentPayment
- Namespace
- RetailForce.Fiscalisation.Model.Document
- Assembly
- RetailForce.Fiscalisation.Model.dll
Payment position of the document.
public class DocumentPayment : DocumentValidationBase
- Inheritance
-
ValidationBase<DocumentValidationError>ValidationPropertyBase<DocumentValidationError>DocumentPayment
- Inherited Members
-
ValidationPropertyBase<DocumentValidationError>.Validate()
Properties
AdditionalFields
Additional payment fields (electronic payment information for instance).
public Dictionary<string, string> AdditionalFields { get; set; }
Property Value
Remarks
The key is not case sensitive.
Amount
The amount of the payment in the currency of the cash register (not a foreign amount).
[Required]
public decimal Amount { get; set; }
Property Value
Remarks
You have to set the amount always (also if you send foreign amount).
Caption
The caption of the payment.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string Caption { get; set; }
Property Value
CardData
Additional information to store credit card receipt data for merchant and customer receipt.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DocumentPaymentCardData CardData { get; set; }
Property Value
Remarks
Information: It is not permitted to save the full credit card number of the voucher.
CreateDate
The create date of the payment if available.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DateTime? CreateDate { get; set; }
Property Value
CurrencyIsoCode
The iso code of the currency of the payment. This is ISO code 4217:2015.
public string CurrencyIsoCode { get; set; }
Property Value
DocumentLevel
The validation level for this element.
protected override DocumentLevel DocumentLevel { get; }
Property Value
ExternalIdentifier
Possibility for one or more external identifier for the calling software.
public List<string> ExternalIdentifier { get; set; }
Property Value
ForeignAmount
The foreign amount of the payment.
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public decimal ForeignAmount { get; set; }
Property Value
ForeignAmountExchangeRate
The exchange rate to the cash register currency.
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public decimal ForeignAmountExchangeRate { get; set; }
Property Value
PaymentTerminalReferenceId
Transaction Id from payment terminal when integrated with cash register and transaction id is stated on the sales receipt.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string PaymentTerminalReferenceId { get; set; }
Property Value
PaymentType
Type of the payment. Required. Used to difference the payment.
[Required]
public PaymentType? PaymentType { get; set; }
Property Value
Remarks
This type is nullable due to backwards compatibility. Please send this information from up v1.0.
SalesPerson
The salesperson for this position (if other salesperson than in document).
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public User SalesPerson { get; set; }
Property Value
TaxValue
The vat value of the booking.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public decimal? TaxValue { get; set; }
Property Value
TaxValue2
The vat value 2 of the booking.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public decimal? TaxValue2 { get; set; }
Property Value
UniqueReadablePaymentIdentifier
An unique id for the payment (used for instance for accounting interfaces, etc.).
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string UniqueReadablePaymentIdentifier { get; set; }
Property Value
Remarks
Necessary if you want to use closing methods (actual stock, closing, cash difference, etc.). Validation error is not sent and SimpleCashPointClosing is activated.
User
The user for this position (if other user than in document).
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public User User { get; set; }
Property Value
VatIdentification
The value added tax for this position.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public int? VatIdentification { get; set; }
Property Value
- int?
VatPercent
The percentage of the vat
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public decimal? VatPercent { get; set; }
Property Value
VatPercent2
The percentage 2 of the vat, optional
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public decimal? VatPercent2 { get; set; }
Property Value
Methods
GetVoucherId()
Returns the voucher id of the additional fields collections.
public string GetVoucherId()
Returns
- string
The voucher id of the additional fields collections.
Revert()
Reverts the payment (turns all values negative)
public void Revert()
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 and returns a list of DocumentValidationError objects.
protected override List<DocumentValidationError> ValidateElement()
Returns
- List<DocumentValidationError>
A list of DocumentValidationError objects.
ValidateScale(uint)
Returns whether the scale of all amounts of the position is smaller or equal the given scale.
public bool ValidateScale(uint scale)
Parameters
scaleuintThe maximum scale for all amounts of the position.
Returns
- bool
True if the scale of all amounts is smaller or equal the given scale; otherwise false.