Sha256: fa5450196ac0bfe4593090513e8a129572be9c8701c208896fe3e3b992d75237

Contents?: true

Size: 1.09 KB

Versions: 3

Compression:

Stored size: 1.09 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 :nfse_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.4 lib/emites/entities/nfse.rb
emites-client-0.1.3 lib/emites/entities/nfse.rb
emites-client-0.1.2 lib/emites/entities/nfse.rb