Module: SKApi::Utils::Serializer

Included in:
Resources::Base
Defined in:
lib/utils/serializer.rb

Overview

Mixed into Resources::Base providing to_hash and to_json serialisation for SKApi Resources. Inside SalesKing this serialising is used to render the output. f.ex. in the clients api controller

=> SKApi::Resources::Client.to_json(a_client)

This way you can keep your API client up to date by using the resources and relying on SKApi::Resources::Client.schema

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



11
12
13
# File 'lib/utils/serializer.rb', line 11

def self.included(base)
  base.extend ClassMethods
end