Class: Smartbill::Sdk::Contracts::PaymentContract

Inherits:
Base
  • Object
show all
Defined in:
lib/smartbill/sdk/contracts/payment_contract.rb

Overview

Validation contract for Models::Payment.

Validates type against the SmartBill payment-type set, value (positive when present), date format, and precision.

Constant Summary collapse

PAYMENT_TYPES =

Allowed type values (mirrors Models::PaymentType).

[
  "Chitanta",
  "Bon",
  "Card",
  "Card online",
  "CEC",
  "Bilet ordin",
  "Ordin plata",
  "Mandat postal",
  "Extras de cont",
  "Ramburs",
  "Alta incasare"
].freeze

Constants inherited from Base

Base::DATE_REGEX

Method Summary

Methods inherited from Base

validate!