Module: Egree::ApiMappers::CaseOptionsMapper

Defined in:
lib/egree/api_mappers/case_options_mapper.rb

Class Method Summary collapse

Class Method Details

.to_api(options = {}, mappers = self.mappers) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/egree/api_mappers/case_options_mapper.rb', line 6

def self.to_api options = {}, mappers = self.mappers
  options.reduce({}) do |api_hash, (client_key, value)|
    if mappers.key?(client_key)
      api_hash.merge(self.map(client_key, value, mappers))
    else
      api_hash
    end
  end || {}
end