Class: MC2P::Resource

Inherits:
ResourceMixin show all
Defined in:
lib/base.rb

Overview

Resource - class used to manage the requests to the API related with a resource ex: product

Direct Known Subclasses

DetailOnlyResource

Instance Method Summary collapse

Methods inherited from ResourceMixin

#_one_item, #detail_url

Constructor Details

#initialize(api_request, path, object_item_class) ⇒ Resource

Initializes a resource Params:

api_request

Api request used to make all the requests to the API

path

Path used to make all the requests to the API

object_item_class

Object item class used to return values



227
228
229
230
# File 'lib/base.rb', line 227

def initialize(api_request, path, object_item_class)
  @paginator_class = Paginator
  super(api_request, path, object_item_class, @paginator_class)
end