Class: InsalesApi::Category

Inherits:
Base
  • Object
show all
Defined in:
lib/insales_api/category.rb

Class Method Summary collapse

Methods inherited from Base

configure, dump_config, for_account, restore_config

Methods included from Resource::Countable

#count

Methods included from Resource::Paginated

#find_each, #find_in_batches

Class Method Details

.set_products_category(new_category_id, product_ids) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/insales_api/category.rb', line 4

def set_products_category(new_category_id, product_ids)
  data = {
    id:           new_category_id,
    product_ids:  Array(product_ids),
  }
  put(:set_products_category, {}, format.encode(data, root: :new_category))
end