Class: Tripletexer::Endpoints::Product

Inherits:
AbstractEndpoint show all
Defined in:
lib/tripletexer/endpoints/product.rb

Defined Under Namespace

Classes: Unit

Instance Method Summary collapse

Methods inherited from AbstractEndpoint

#initialize

Constructor Details

This class inherits a constructor from Tripletexer::Endpoints::AbstractEndpoint

Instance Method Details

#create(body) ⇒ Object



17
18
19
# File 'lib/tripletexer/endpoints/product.rb', line 17

def create(body)
  create_entity('/v2/product', body)
end

#find(id, params = {}) ⇒ Object



12
13
14
# File 'lib/tripletexer/endpoints/product.rb', line 12

def find(id, params = {})
  find_entity("/v2/product/#{id}", params)
end

#search(params = {}) ⇒ Object



7
8
9
# File 'lib/tripletexer/endpoints/product.rb', line 7

def search(params = {})
  find_entities('/v2/product', params)
end

#unitObject



26
27
28
# File 'lib/tripletexer/endpoints/product.rb', line 26

def unit
  ::Tripletexer::Endpoints::Product::Unit.new(api_client)
end

#update(id, body = {}) ⇒ Object



22
23
24
# File 'lib/tripletexer/endpoints/product.rb', line 22

def update(id, body = {})
  update_entity("/v2/product/#{id}", body)
end