Class: Fortnox::API::Mapper::Base

Inherits:
Object
  • Object
show all
Extended by:
CanonicalNameSym
Includes:
FromJSON, ToJSON
Defined in:
lib/fortnox/api/mappers/base.rb

Instance Method Summary collapse

Methods included from CanonicalNameSym

canonical_name_sym

Methods included from ToJSON

#entity_to_hash, included, #wrap_entity_json_hash

Methods included from FromJSON

#wrapped_json_collection_to_entities_hash, #wrapped_json_hash_to_entity_hash

Instance Method Details

#diff(entity_hash, parent_hash) ⇒ Object



15
16
17
18
# File 'lib/fortnox/api/mappers/base.rb', line 15

def diff(entity_hash, parent_hash)
  hash_diff(entity_hash[self.class::JSON_ENTITY_WRAPPER],
            parent_hash[self.class::JSON_ENTITY_WRAPPER])
end