Class: Latitude::API::Operations::NestedAccessor

Inherits:
Object
  • Object
show all
Defined in:
lib/latitude/api/operations/nested.rb

Instance Method Summary collapse

Constructor Details

#initialize(klass:, path_params:) ⇒ NestedAccessor

Returns a new instance of NestedAccessor.



26
27
28
29
# File 'lib/latitude/api/operations/nested.rb', line 26

def initialize(klass:, path_params:)
  @klass = klass
  @path_params = path_params
end

Instance Method Details

#create(params = {}, opts = {}) ⇒ Object



39
40
41
# File 'lib/latitude/api/operations/nested.rb', line 39

def create(params = {}, opts = {})
  @klass.create(params.merge(@path_params), opts)
end

#delete(id, params = {}, opts = {}) ⇒ Object



47
48
49
# File 'lib/latitude/api/operations/nested.rb', line 47

def delete(id, params = {}, opts = {})
  @klass.delete(id, params.merge(@path_params), opts)
end

#list(params = {}, opts = {}) ⇒ Object



31
32
33
# File 'lib/latitude/api/operations/nested.rb', line 31

def list(params = {}, opts = {})
  @klass.list(params.merge(@path_params), opts, path_params: @path_params)
end

#retrieve(id, params = {}, opts = {}) ⇒ Object



35
36
37
# File 'lib/latitude/api/operations/nested.rb', line 35

def retrieve(id, params = {}, opts = {})
  @klass.retrieve(id, params.merge(@path_params), opts)
end

#update(id, params = {}, opts = {}) ⇒ Object



43
44
45
# File 'lib/latitude/api/operations/nested.rb', line 43

def update(id, params = {}, opts = {})
  @klass.update(id, params.merge(@path_params), opts)
end