Module: Fulfillment::Resources::Products

Extended by:
Products
Included in:
Products
Defined in:
lib/fulfillment/resources/products.rb

Instance Method Summary collapse

Instance Method Details

#create_or_update(params = {}) ⇒ Object



11
12
13
# File 'lib/fulfillment/resources/products.rb', line 11

def create_or_update(params={})
  response = Request.new("products", params).post
end

#find(params = {}) ⇒ Object



6
7
8
9
# File 'lib/fulfillment/resources/products.rb', line 6

def find(params={})
  response = Request.new("products", { search: params }).get
  Models::Collection.new(Models::Product, response.body)
end

#update_all(show_id:, params:) ⇒ Object



15
16
17
# File 'lib/fulfillment/resources/products.rb', line 15

def update_all(show_id:, params:)
  response = Request.new("products/#{show_id}", params).patch
end