Class: InsalesApi::Variant
- Defined in:
- lib/insales_api/variant.rb
Class Method Summary collapse
-
.group_update(variants) ⇒ Object
Updates all given variants.
Methods inherited from Base
configure, dump_config, for_account, restore_config
Methods included from Resource::Countable
Methods included from Resource::Paginated
Class Method Details
.group_update(variants) ⇒ Object
Updates all given variants. variants
should be array:
[
{
id: 1,
price: 340,
quantity: 4,
},
{
id: 2,
price: 350,
quantity: 5,
},
]
18 19 20 |
# File 'lib/insales_api/variant.rb', line 18 def group_update(variants) put(:group_update, {}, format.encode(variants, root: :variants)) end |