Module: Calculated::GenericObjectApiCalls

Included in:
Session
Defined in:
lib/calculated/generic_object_api_calls.rb

Instance Method Summary (collapse)

Instance Method Details

- (Array<Calculated::Models::FormulaInput>) formula_inputs_for_generic_object(id, params = {})



24
25
26
27
28
# File 'lib/calculated/generic_object_api_calls.rb', line 24

def formula_inputs_for_generic_object(id, params = {})
  api_call(:get, "/generic_objects/#{id}/formula_inputs", params) do |response|
   response["formula_inputs"].map{|formula_input| Calculated::Models::FormulaInput.new(formula_input)}
  end
end

- (Calculated::Models::GeneriObject) generic_object(id, params = {})



15
16
17
18
19
# File 'lib/calculated/generic_object_api_calls.rb', line 15

def generic_object(id, params = {})
  api_call(:get, "/generic_objects/#{id}", params) do |response|
     Calculated::Models::GenericObject.new(response["generic_object"])
  end
end

- (Array<Calculated::Models::GeneriObject>) generic_objects(params = {})



6
7
8
9
10
# File 'lib/calculated/generic_object_api_calls.rb', line 6

def generic_objects(params = {})
  api_call(:get, "/generic_objects", params) do |response|
    response["generic_objects"].map{|generic_object| Calculated::Models::GenericObject.new(generic_object)}
  end
end