Sha256: 21ef11b16c5fbf0f1b965c1fc7f906cd84cd3e01dbbe72f655f8135c22722b5e

Contents?: true

Size: 471 Bytes

Versions: 3

Compression:

Stored size: 471 Bytes

Contents

module Einvoice
  module Neweb
    module Model
      class SellerInvoice < Invoice
        TYPE_SPECIFIC_KEYS = [:invoice_number, :invoice_date]

        attr_accessor *TYPE_SPECIFIC_KEYS

        validates :invoice_number, presence: true, length: { maximum: 20 }
        validates :invoice_date, presence: true, length: { maximum: 10 }, format: { with: /\A\d{4}\/\d{2}\/\d{2}\Z/ }

        def initialize
          # overwritten
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
einvoice-1.1.1 lib/einvoice/neweb/model/seller_invoice.rb
einvoice-1.1.0 lib/einvoice/neweb/model/seller_invoice.rb
einvoice-1.0.0 lib/einvoice/neweb/model/seller_invoice.rb