Sha256: 99b331c99c7362acb2b1357492b4845295c1858d1b3baf3ae9018f259f9c79a2

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

module Emites
  module Entities
    class Nfse < Base
      attribute :id,                  Integer
      attribute :emitter_id,          Integer
      attribute :taker,               Taker
      attribute :rps_situation,       Integer
      attribute :serie,               String
      attribute :number,              Integer
      attribute :rps_type,            Integer
      attribute :emission_date,       DateTime
      attribute :emission_date_nfse,  DateTime
      attribute :operation_nature,    Integer
      attribute :other_informations,  String
      attribute :competence,          Date
      attribute :special_regime,      Integer
      attribute :status,              String
      attribute :description,         String
      attribute :send_nfse_taker,     Boolean
      attribute :service_values,      NfseValues
      attribute :_links,              Array

      def url(action)
        links = self._links || []
        link  = links.find { |link| link["rel"].to_s == action.to_s } || {}
        link.fetch("href") { "" }
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
emites-client-0.1.1 lib/emites/entities/nfse.rb
emites-client-0.1.0 lib/emites/entities/nfse.rb
emites-client-0.0.4 lib/emites/entities/nfse.rb