Module: LexofficeClient::Model::Base::SerializationConcern
- Included in:
- LexofficeClient::Model::Base
- Defined in:
- lib/lexoffice_client/model/base.rb
Instance Method Summary collapse
Instance Method Details
#as_json(options = {}) ⇒ Object
62 63 64 65 66 |
# File 'lib/lexoffice_client/model/base.rb', line 62 def as_json( = {}) attributes.each_with_object({}) do |(attr_name, value), memo| memo[attr_name.to_sym] = value.respond_to?(:as_json) ? value.as_json() : value end end |
#to_json(options = {}) ⇒ Object
68 69 70 |
# File 'lib/lexoffice_client/model/base.rb', line 68 def to_json( = {}) as_json().to_json end |